Showing preview only (2,011K chars total). Download the full file or copy to clipboard to get everything.
Repository: bosun-ai/swiftide
Branch: master
Commit: 849ebf9a2a7e
Files: 350
Total size: 1.9 MB
Directory structure:
gitextract_d7f6_hv1/
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ └── feature_request.md
│ ├── dependabot.yml
│ └── workflows/
│ ├── bench.yml
│ ├── coverage.yml
│ ├── discord.yml
│ ├── lint.yml
│ ├── pr.yml
│ ├── release.yml
│ └── test.yml
├── .gitignore
├── .markdownlint.yaml
├── AGENTS.md
├── CHANGELOG.md
├── CONTRIBUTING.md
├── Cargo.toml
├── LICENSE
├── README.md
├── benchmarks/
│ ├── Cargo.toml
│ ├── fileloader.rs
│ ├── local_pipeline.rs
│ ├── node_cache_comparison.rs
│ └── output.txt
├── cliff.toml
├── deny.toml
├── examples/
│ ├── Cargo.toml
│ ├── agent_can_fail_custom_schema.rs
│ ├── agents_mcp_tools.rs
│ ├── agents_resume.rs
│ ├── agents_with_human_in_the_loop.rs
│ ├── aws_bedrock.rs
│ ├── aws_bedrock_agent.rs
│ ├── dashscope.rs
│ ├── describe_image.rs
│ ├── fastembed.rs
│ ├── fluvio.rs
│ ├── hello_agents.rs
│ ├── hybrid_search.rs
│ ├── index_codebase.rs
│ ├── index_codebase_reduced_context.rs
│ ├── index_groq.rs
│ ├── index_into_redis.rs
│ ├── index_markdown_lots_of_metadata.rs
│ ├── index_md_into_pgvector.rs
│ ├── index_ollama.rs
│ ├── kafka.rs
│ ├── lancedb.rs
│ ├── langfuse.rs
│ ├── query_pipeline.rs
│ ├── reranking.rs
│ ├── responses_api.rs
│ ├── responses_api_reasoning.rs
│ ├── scraping_index_to_markdown.rs
│ ├── stop_with_args_custom_schema.rs
│ ├── store_multiple_vectors.rs
│ ├── streaming_agents.rs
│ ├── structured_prompt.rs
│ ├── tasks.rs
│ ├── tool_custom_schema.rs
│ └── usage_metrics.rs
├── release-plz.toml
├── renovate.json
├── rust-toolchain.toml
├── rustfmt.toml
├── swiftide/
│ ├── Cargo.toml
│ ├── build.rs
│ ├── src/
│ │ ├── lib.rs
│ │ └── test_utils.rs
│ └── tests/
│ ├── dyn_traits.rs
│ ├── indexing_pipeline.rs
│ ├── lancedb.rs
│ ├── pgvector.rs
│ ├── query_pipeline.rs
│ └── sparse_embeddings_and_hybrid_search.rs
├── swiftide-agents/
│ ├── Cargo.toml
│ └── src/
│ ├── agent.rs
│ ├── default_context.rs
│ ├── errors.rs
│ ├── hooks.rs
│ ├── lib.rs
│ ├── snapshots/
│ │ ├── swiftide_agents__system_prompt__tests__customization.snap
│ │ └── swiftide_agents__system_prompt__tests__to_prompt.snap
│ ├── state.rs
│ ├── system_prompt.rs
│ ├── system_prompt_template.md
│ ├── tasks/
│ │ ├── closures.rs
│ │ ├── errors.rs
│ │ ├── impls.rs
│ │ ├── mod.rs
│ │ ├── node.rs
│ │ ├── task.rs
│ │ └── transition.rs
│ ├── test_utils.rs
│ ├── tools/
│ │ ├── arg_preprocessor.rs
│ │ ├── control.rs
│ │ ├── local_executor.rs
│ │ ├── mcp.rs
│ │ └── mod.rs
│ └── util.rs
├── swiftide-core/
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── agent_traits.rs
│ ├── chat_completion/
│ │ ├── chat_completion_request.rs
│ │ ├── chat_completion_response.rs
│ │ ├── chat_message.rs
│ │ ├── errors.rs
│ │ ├── mod.rs
│ │ ├── tool_schema.rs
│ │ ├── tools.rs
│ │ └── traits.rs
│ ├── document.rs
│ ├── indexing_decorators.rs
│ ├── indexing_defaults.rs
│ ├── indexing_stream.rs
│ ├── indexing_traits.rs
│ ├── lib.rs
│ ├── metadata.rs
│ ├── metrics.rs
│ ├── node.rs
│ ├── prelude.rs
│ ├── prompt.rs
│ ├── query.rs
│ ├── query_evaluation.rs
│ ├── query_stream.rs
│ ├── query_traits.rs
│ ├── search_strategies/
│ │ ├── custom_strategy.rs
│ │ ├── hybrid_search.rs
│ │ ├── mod.rs
│ │ └── similarity_single_embedding.rs
│ ├── statistics.rs
│ ├── stream_backoff.rs
│ ├── test_utils.rs
│ ├── token_estimation.rs
│ ├── type_aliases.rs
│ └── util.rs
├── swiftide-indexing/
│ ├── Cargo.toml
│ └── src/
│ ├── lib.rs
│ ├── loaders/
│ │ ├── file_loader.rs
│ │ └── mod.rs
│ ├── persist/
│ │ ├── memory_storage.rs
│ │ └── mod.rs
│ ├── pipeline.rs
│ └── transformers/
│ ├── chunk_markdown.rs
│ ├── chunk_text.rs
│ ├── embed.rs
│ ├── metadata_keywords.rs
│ ├── metadata_qa_text.rs
│ ├── metadata_summary.rs
│ ├── metadata_title.rs
│ ├── mod.rs
│ ├── prompts/
│ │ ├── metadata_keywords.prompt.md
│ │ ├── metadata_qa_text.prompt.md
│ │ ├── metadata_summary.prompt.md
│ │ └── metadata_title.prompt.md
│ ├── snapshots/
│ │ ├── swiftide_indexing__transformers__compress_code_outline__test__compress_code_template.snap
│ │ ├── swiftide_indexing__transformers__metadata_keywords__test__template.snap
│ │ ├── swiftide_indexing__transformers__metadata_qa_code__test__template.snap
│ │ ├── swiftide_indexing__transformers__metadata_qa_code__test__template_with_outline.snap
│ │ ├── swiftide_indexing__transformers__metadata_qa_text__test__template.snap
│ │ ├── swiftide_indexing__transformers__metadata_summary__test__template.snap
│ │ └── swiftide_indexing__transformers__metadata_title__test__template.snap
│ └── sparse_embed.rs
├── swiftide-integrations/
│ ├── Cargo.toml
│ └── src/
│ ├── anthropic/
│ │ ├── chat_completion.rs
│ │ ├── mod.rs
│ │ ├── simple_prompt.rs
│ │ └── tool_schema.rs
│ ├── aws_bedrock_v2/
│ │ ├── chat_completion.rs
│ │ ├── mod.rs
│ │ ├── simple_prompt.rs
│ │ ├── structured_prompt.rs
│ │ ├── test_utils.rs
│ │ └── tool_schema.rs
│ ├── dashscope/
│ │ ├── config.rs
│ │ └── mod.rs
│ ├── duckdb/
│ │ ├── extensions.sql
│ │ ├── hybrid_query.sql
│ │ ├── mod.rs
│ │ ├── node_cache.rs
│ │ ├── persist.rs
│ │ ├── retrieve.rs
│ │ ├── schema.sql
│ │ └── upsert.sql
│ ├── fastembed/
│ │ ├── embedding_model.rs
│ │ ├── mod.rs
│ │ ├── rerank.rs
│ │ └── sparse_embedding_model.rs
│ ├── fluvio/
│ │ ├── loader.rs
│ │ └── mod.rs
│ ├── gemini/
│ │ ├── config.rs
│ │ └── mod.rs
│ ├── groq/
│ │ ├── config.rs
│ │ └── mod.rs
│ ├── kafka/
│ │ ├── loader.rs
│ │ ├── mod.rs
│ │ └── persist.rs
│ ├── lancedb/
│ │ ├── connection_pool.rs
│ │ ├── mod.rs
│ │ ├── persist.rs
│ │ └── retrieve.rs
│ ├── lib.rs
│ ├── ollama/
│ │ ├── config.rs
│ │ └── mod.rs
│ ├── open_router/
│ │ ├── config.rs
│ │ └── mod.rs
│ ├── openai/
│ │ ├── chat_completion.rs
│ │ ├── embed.rs
│ │ ├── mod.rs
│ │ ├── responses_api.rs
│ │ ├── simple_prompt.rs
│ │ ├── structured_prompt.rs
│ │ └── tool_schema.rs
│ ├── parquet/
│ │ ├── loader.rs
│ │ ├── mod.rs
│ │ └── test.parquet
│ ├── pgvector/
│ │ ├── fixtures.rs
│ │ ├── mod.rs
│ │ ├── persist.rs
│ │ ├── pgv_table_types.rs
│ │ └── retrieve.rs
│ ├── qdrant/
│ │ ├── indexing_node.rs
│ │ ├── mod.rs
│ │ ├── persist.rs
│ │ └── retrieve.rs
│ ├── redb/
│ │ ├── mod.rs
│ │ └── node_cache.rs
│ ├── redis/
│ │ ├── message_history.rs
│ │ ├── mod.rs
│ │ ├── node_cache.rs
│ │ └── persist.rs
│ ├── scraping/
│ │ ├── html_to_markdown_transformer.rs
│ │ ├── loader.rs
│ │ └── mod.rs
│ ├── tiktoken/
│ │ └── mod.rs
│ └── treesitter/
│ ├── chunk_code.rs
│ ├── code_tree.rs
│ ├── compress_code_outline.rs
│ ├── metadata_qa_code.rs
│ ├── metadata_refs_defs_code.rs
│ ├── mod.rs
│ ├── outline_code_tree_sitter.rs
│ ├── outliner.rs
│ ├── prompts/
│ │ ├── compress_code_outline.prompt.md
│ │ └── metadata_qa_code.prompt.md
│ ├── queries.rs
│ ├── snapshots/
│ │ ├── swiftide_integrations__treesitter__compress_code_outline__test__compress_code_template.snap
│ │ ├── swiftide_integrations__treesitter__metadata_qa_code__test__default_prompt.snap
│ │ └── swiftide_integrations__treesitter__metadata_qa_code__test__template_with_outline.snap
│ ├── splitter.rs
│ └── supported_languages.rs
├── swiftide-langfuse/
│ ├── Cargo.toml
│ ├── src/
│ │ ├── apis/
│ │ │ ├── configuration.rs
│ │ │ ├── ingestion_api.rs
│ │ │ └── mod.rs
│ │ ├── langfuse_batch_manager.rs
│ │ ├── lib.rs
│ │ ├── models/
│ │ │ ├── create_event_body.rs
│ │ │ ├── create_generation_body.rs
│ │ │ ├── create_score_value.rs
│ │ │ ├── create_span_body.rs
│ │ │ ├── ingestion_batch_request.rs
│ │ │ ├── ingestion_error.rs
│ │ │ ├── ingestion_event.rs
│ │ │ ├── ingestion_event_one_of.rs
│ │ │ ├── ingestion_event_one_of_1.rs
│ │ │ ├── ingestion_event_one_of_2.rs
│ │ │ ├── ingestion_event_one_of_3.rs
│ │ │ ├── ingestion_event_one_of_4.rs
│ │ │ ├── ingestion_event_one_of_5.rs
│ │ │ ├── ingestion_event_one_of_6.rs
│ │ │ ├── ingestion_event_one_of_7.rs
│ │ │ ├── ingestion_event_one_of_8.rs
│ │ │ ├── ingestion_event_one_of_9.rs
│ │ │ ├── ingestion_response.rs
│ │ │ ├── ingestion_success.rs
│ │ │ ├── ingestion_usage.rs
│ │ │ ├── map_value.rs
│ │ │ ├── mod.rs
│ │ │ ├── model_usage_unit.rs
│ │ │ ├── observation_body.rs
│ │ │ ├── observation_level.rs
│ │ │ ├── observation_type.rs
│ │ │ ├── open_ai_completion_usage_schema.rs
│ │ │ ├── open_ai_response_usage_schema.rs
│ │ │ ├── open_ai_usage.rs
│ │ │ ├── optional_observation_body.rs
│ │ │ ├── score_body.rs
│ │ │ ├── score_data_type.rs
│ │ │ ├── sdk_log_body.rs
│ │ │ ├── trace_body.rs
│ │ │ ├── update_generation_body.rs
│ │ │ ├── update_span_body.rs
│ │ │ ├── usage.rs
│ │ │ └── usage_details.rs
│ │ └── tracing_layer.rs
│ └── tests/
│ ├── full_flow.rs
│ └── snapshots/
│ └── full_flow__integration_tracing_layer_sends_to_langfuse.snap
├── swiftide-macros/
│ ├── Cargo.toml
│ ├── src/
│ │ ├── indexing_transformer.rs
│ │ ├── lib.rs
│ │ ├── test_utils.rs
│ │ └── tool/
│ │ ├── args.rs
│ │ ├── mod.rs
│ │ ├── snapshots/
│ │ │ ├── swiftide_macros__tool__tests__simple_tool.snap
│ │ │ ├── swiftide_macros__tool__tests__snapshot_derive.snap
│ │ │ ├── swiftide_macros__tool__tests__snapshot_derive_with_args.snap
│ │ │ ├── swiftide_macros__tool__tests__snapshot_derive_with_generics.snap
│ │ │ ├── swiftide_macros__tool__tests__snapshot_derive_with_lifetime.snap
│ │ │ ├── swiftide_macros__tool__tests__snapshot_derive_with_option.snap
│ │ │ ├── swiftide_macros__tool__tests__snapshot_multiple_args.snap
│ │ │ ├── swiftide_macros__tool__tests__snapshot_single_arg.snap
│ │ │ └── swiftide_macros__tool__tests__snapshot_single_arg_option.snap
│ │ ├── tool_spec.rs
│ │ └── wrapped.rs
│ └── tests/
│ ├── tool/
│ │ ├── tool_derive_missing_description.rs
│ │ ├── tool_derive_missing_description.stderr
│ │ ├── tool_derive_pass.rs
│ │ ├── tool_derive_vec_argument_pass.rs
│ │ ├── tool_missing_arg_fail.rs
│ │ ├── tool_missing_arg_fail.stderr
│ │ ├── tool_missing_parameter_fail.rs
│ │ ├── tool_missing_parameter_fail.stderr
│ │ ├── tool_multiple_arguments_pass.rs
│ │ ├── tool_no_argument_pass.rs
│ │ ├── tool_object_argument_pass.rs
│ │ └── tool_single_argument_pass.rs
│ └── tool.rs
├── swiftide-query/
│ ├── Cargo.toml
│ └── src/
│ ├── answers/
│ │ ├── mod.rs
│ │ ├── simple.rs
│ │ └── snapshots/
│ │ ├── swiftide_query__answers__simple__test__custom_document_template.snap
│ │ ├── swiftide_query__answers__simple__test__default_prompt.snap
│ │ └── swiftide_query__answers__simple__test__uses_current_if_present.snap
│ ├── evaluators/
│ │ ├── mod.rs
│ │ └── ragas.rs
│ ├── lib.rs
│ ├── query/
│ │ ├── mod.rs
│ │ └── pipeline.rs
│ ├── query_transformers/
│ │ ├── embed.rs
│ │ ├── generate_subquestions.rs
│ │ ├── mod.rs
│ │ ├── snapshots/
│ │ │ └── swiftide_query__query_transformers__generate_subquestions__test__default_prompt.snap
│ │ └── sparse_embed.rs
│ └── response_transformers/
│ ├── mod.rs
│ ├── snapshots/
│ │ └── swiftide_query__response_transformers__summary__test__default_prompt.snap
│ └── summary.rs
├── swiftide-test-utils/
│ ├── Cargo.toml
│ └── src/
│ ├── lib.rs
│ └── test_utils.rs
└── typos.toml
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: ""
labels: ""
assignees: ""
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
A clear and minimal example to reproduce the bug.
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional context**
Add any other context about the problem here.
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
================================================
FILE: .github/dependabot.yml
================================================
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: "cargo" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
groups:
development:
dependency-type: "development"
tree-sitter:
patterns:
- "tree-sitter*"
aws:
patterns:
- "aws*"
minor:
update-types:
- "minor"
- "patch"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
================================================
FILE: .github/workflows/bench.yml
================================================
name: Bench
on:
push:
branches:
- master
permissions:
contents: write
deployments: write
jobs:
benchmark:
name: Benchmark
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- name: Install Protoc
uses: arduino/setup-protoc@v3
- name: Run benchmark
run: cargo bench -p benchmarks -- --output-format bencher | tee benchmarks/output.txt
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: Rust Benchmark
tool: "cargo"
output-file-path: benchmarks/output.txt
github-token: ${{ github.token }}
auto-push: true
# Show alert with commit comment on detecting possible performance regression
alert-threshold: "200%"
comment-on-alert: true
fail-on-alert: true
alert-comment-cc-users: "@timonv"
================================================
FILE: .github/workflows/coverage.yml
================================================
name: Coverage
on:
pull_request:
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-coverage
cancel-in-progress: true
env:
RUSTFLAGS: "-Dwarnings -Clink-arg=-fuse-ld=lld"
jobs:
test:
name: coverage
runs-on: ubuntu-latest
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
- name: Checkout repository
uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@nightly
with:
components: llvm-tools-preview
- name: Install Protoc
uses: arduino/setup-protoc@v3
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y lld libcurl4-openssl-dev
- name: Generate code coverage
run: |
cargo llvm-cov --tests -j 2 --all-features --lcov --output-path lcov.info
- name: Coveralls
uses: coverallsapp/github-action@v2
================================================
FILE: .github/workflows/discord.yml
================================================
on:
release:
types: [published]
jobs:
github-releases-to-discord:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Github Releases To Discord
uses: SethCohen/github-releases-to-discord@v1.19.0
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}
color: "2105893"
username: "Release Changelog"
avatar_url: "https://cdn.discordapp.com/avatars/487431320314576937/bd64361e4ba6313d561d54e78c9e7171.png"
footer_title: "Changelog"
footer_icon_url: "https://cdn.discordapp.com/avatars/487431320314576937/bd64361e4ba6313d561d54e78c9e7171.png"
footer_timestamp: true
================================================
FILE: .github/workflows/lint.yml
================================================
name: CI
on:
pull_request:
merge_group:
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-lint
env:
CARGO_TERM_COLOR: always
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: r7kamura/rust-problem-matchers@v1
- name: Install Protoc
uses: arduino/setup-protoc@v3
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev
- name: Check typos
uses: crate-ci/typos@master
# - name: Lint dependencies
# uses: EmbarkStudios/cargo-deny-action@v2
- name: clippy
run: cargo clippy --all-targets --all-features --workspace
env:
RUSTFLAGS: "-Dwarnings"
lint-formatting:
name: Lint formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- uses: r7kamura/rust-problem-matchers@v1
- name: "Rustfmt"
run: cargo +nightly fmt --all -- --check
env:
RUSTFLAGS: "-Dwarnings"
hack:
name: Cargo Hack
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- uses: r7kamura/rust-problem-matchers@v1
- name: Install Protoc
uses: arduino/setup-protoc@v3
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev
- name: Install cargo-hack
uses: taiki-e/install-action@v2
with:
tool: cargo-hack
- name: Check features with Cargo Hack
run: cargo hack check --each-feature --no-dev-deps
================================================
FILE: .github/workflows/pr.yml
================================================
name: Check Pull Requests
on:
pull_request_target:
types:
- opened
- edited
- synchronize
- labeled
- unlabeled
merge_group:
permissions:
pull-requests: write
jobs:
check-title:
runs-on: ubuntu-latest
steps:
- name: Check PR title
if: github.event_name == 'pull_request_target'
uses: amannn/action-semantic-pull-request@v6
id: check_pr_title
env:
GITHUB_TOKEN: ${{ github.token }}
# Add comment indicating we require pull request titles to follow conventional commits specification
- uses: marocchino/sticky-pull-request-comment@v2
if: always() && (steps.check_pr_title.outputs.error_message != null)
with:
header: pr-title-lint-error
message: |
Thank you for opening this pull request!
We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.
Details:
> ${{ steps.check_pr_title.outputs.error_message }}
# Delete a previous comment when the issue has been resolved
- if: ${{ steps.check_pr_title.outputs.error_message == null }}
uses: marocchino/sticky-pull-request-comment@v2
with:
header: pr-title-lint-error
delete: true
check-breaking-change-label:
runs-on: ubuntu-latest
env:
# use an environment variable to pass untrusted input to the script
# see https://securitylab.github.com/research/github-actions-untrusted-input/
PR_TITLE: ${{ github.event.pull_request.title }}
steps:
- name: Check breaking change label
id: check_breaking_change
run: |
pattern='^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\(\w+\))?!:'
# Check if pattern matches
if echo "${PR_TITLE}" | grep -qE "$pattern"; then
echo "breaking_change=true" >> "$GITHUB_OUTPUT"
else
echo "breaking_change=false" >> "$GITHUB_OUTPUT"
fi
- name: Add label
if: steps.check_breaking_change.outputs.breaking_change == 'true'
uses: actions/github-script@v8
with:
github-token: ${{ github.token }}
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['breaking change']
})
do-not-merge:
if: ${{ contains(github.event.*.labels.*.name, 'do not merge') }}
name: Prevent Merging
runs-on: ubuntu-latest
steps:
- name: Check for label
run: |
echo "Pull request is labeled as 'do not merge'"
echo "This workflow fails so that the pull request cannot be merged"
exit 1
================================================
FILE: .github/workflows/release.yml
================================================
name: Release
permissions:
pull-requests: write
contents: write
on:
push:
branches:
- master
jobs:
release-swiftide:
name: Crates.io
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
token: ${{ secrets.RELEASE_PLZ_TOKEN }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run release-plz
uses: MarcoIeni/release-plz-action@v0.5
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
GITHUB_REPO: ${{ github.repository }}
================================================
FILE: .github/workflows/test.yml
================================================
name: CI
on:
pull_request:
merge_group:
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-test
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-Dwarnings -Clink-arg=-fuse-ld=lld"
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- name: Install Protoc
uses: arduino/setup-protoc@v3
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y lld libcurl4-openssl-dev
- name: "Test"
run: cargo test -j 2 --tests --all-features --no-fail-fast
docs:
name: Docs
runs-on: ubuntu-latest
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- name: Install Protoc
uses: arduino/setup-protoc@v3
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y lld libcurl4-openssl-dev
- name: "Test"
run: cargo test --doc --all-features --no-fail-fast
================================================
FILE: .gitignore
================================================
# Generated by Cargo
# will have compiled files and executables
debug/
target/
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
# These are backup files generated by rustfmt
**/*.rs.bk
# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb
# Added by cargo
target
tmp
.env
.env*.local
**/.fastembed_cache
.idea/
.history.cargo
================================================
FILE: .markdownlint.yaml
================================================
# configuration for https://github.com/DavidAnson/markdownlint
first-line-heading: false
no-inline-html: false
line-length: false
# to support repeated headers in the changelog
no-duplicate-heading: false
================================================
FILE: AGENTS.md
================================================
# Repository Guidelines
## Project Structure & Module Organization
Swiftide is a Rust workspace driven by the library in `swiftide/`, with supporting crates such as `swiftide-core/` for shared primitives, `swiftide-agents/` for agent orchestration, `swiftide-indexing/` and `swiftide-query/` for pipeline flows, and `swiftide-integrations/` for external connectors. Shared fixtures live in `swiftide-test-utils/`, while `examples/` hosts runnable demos and `benchmarks/` tracks performance scenarios. Static assets (logos and diagrams) are under `images/`.
## Build, Test, and Development Commands
- `cargo check --workspace --all-features` quickly verifies the entire workspace compiles with all feature flags enabled.
- `cargo build --workspace --all-features` compiles every crate and surfaces feature-gating issues early.
- `cargo check -p swiftide-agents` is a fast way to probe agent changes before touching the rest of the workspace.
- `cargo +nightly fmt --all` applies the repo `rustfmt.toml` (comment wrapping requires nightly); use `cargo +nightly fmt --all -- --check` to mirror CI formatting validation.
- `cargo clippy --workspace --all-targets --all-features -- -D warnings` mirrors the main lint job and keeps us aligned with the pedantic lint profile baked into `Cargo.toml`.
- `cargo test -j 2 --tests --all-features --no-fail-fast` mirrors the main CI test job for unit and integration tests.
- `cargo test --doc --all-features --no-fail-fast` mirrors the docs test job in CI.
- `cargo hack check --each-feature --no-dev-deps` mirrors the Cargo Hack feature-matrix check run in CI.
- `typos` mirrors the spelling check run in CI.
- `cargo test --workspace` is still useful locally when you want a broader default test sweep; use `RUST_LOG=info` if you need verbose diagnostics.
- Snapshot updates flow through `cargo insta review` after tests rewrite `.snap` files.
## Coding Style & Naming Conventions
Follow Rust 2024 idioms with four-space indentation. Public APIs should embrace builder patterns and the naming guidance from the Rust API Guidelines: `snake_case` for functions, `UpperCamelCase` for types, and `SCREAMING_SNAKE_CASE` constants. Avoid `unsafe` blocks—`Cargo.toml` forbids them at the workspace level. Keep comments concise so `wrap_comments = true` can format them within 100 columns.
## Testing Guidelines
Prefer focused crate runs such as `cargo test -p swiftide-integrations` when iterating, and opt into `-- --ignored` for heavier scenarios. Integration tests rely on `testcontainers`, so ensure Docker is available; keep fixtures inside `swiftide-test-utils/` to reuse container helpers. For `insta` snapshots, commit reviewed `.snap.new` diffs only after `cargo insta review` removes pending files.
## Commit & Pull Request Guidelines
Commits follow conventional syntax (`feat(agents): …`, `fix(indexing): …`) with a lowercase imperative summary. Pull request titles are also checked against the conventional commits format in CI, and titles ending in `!` receive the `breaking change` label automatically. Each PR should describe the change, link any GitHub issue, note API or schema impacts, and include before/after traces or logs when behavior changes. Update docs (README, website, or inline rustdoc) and add tests or benchmarks alongside functional work. Before requesting review, run the full lint and test suite listed above.
## Tooling & Environment Notes
The workspace pins `stable` in `rust-toolchain.toml`; use the same channel unless a nightly tool is explicitly required. Dependency hygiene is enforced with `cargo deny --workspace`, and spelling checks may run via `typos`. Store local credentials with `mise` or environment variables—never commit secrets.
================================================
FILE: CHANGELOG.md
================================================
# Changelog
All notable changes to this project will be documented in this file.
## [0.32.1](https://github.com/bosun-ai/swiftide/compare/v0.32.0...v0.32.1) - 2025-11-08
### New features
- [8bca0ef](https://github.com/bosun-ai/swiftide/commit/8bca0efa246e6adac061006f5f72cc9dd038cc8f) *(integrations/tree-sitter)* Add C# support ([#967](https://github.com/bosun-ai/swiftide/pull/967))
- [da35870](https://github.com/bosun-ai/swiftide/commit/da358708c83459c7f990027759fa5c56a2b647b9) Custom schema for fail tool ([#966](https://github.com/bosun-ai/swiftide/pull/966))
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.32.0...0.32.1
## [0.32.0](https://github.com/bosun-ai/swiftide/compare/v0.31.3...v0.32.0) - 2025-11-05
### New features
- [9ae3331](https://github.com/bosun-ai/swiftide/commit/9ae33317bbcbf5e65e3aa7eb0bf378190b7c33b5) *(agents)* [**breaking**] Improve toolspec api with schemars and support all possible types ([#940](https://github.com/bosun-ai/swiftide/pull/940))
**BREAKING CHANGE**: macro-level `json_type` overrides beyond the basic
primitives are no longer enforced; rely on Rust type inference or
provide an explicit schemars-derived struct/custom schema when specific
shapes are required
- [a0cc8d7](https://github.com/bosun-ai/swiftide/commit/a0cc8d73a6ce9a82a03a78e8f83957d3c1455584) *(agents)* Stop with args with optional schema ([#950](https://github.com/bosun-ai/swiftide/pull/950))
- [8ad7d97](https://github.com/bosun-ai/swiftide/commit/8ad7d97b6911bd3c676c79a2d5318c31dad23e9f) *(agents)* Add configurable timeouts to commands and local executor ([#963](https://github.com/bosun-ai/swiftide/pull/963))
- [29289d3](https://github.com/bosun-ai/swiftide/commit/29289d37cb9c49fba89376c125194fc430c57a37) *(agents)* [**breaking**] Add working directories for executor and commands ([#941](https://github.com/bosun-ai/swiftide/pull/941))
**BREAKING CHANGE**: Add working directories for executor and commands ([#941](https://github.com/bosun-ai/swiftide/pull/941))
- [ce724e5](https://github.com/bosun-ai/swiftide/commit/ce724e56034d717aafde08bb6c2d9dc163c66caf) *(agents/mcp)* Prefix mcp tools with the server name ([#958](https://github.com/bosun-ai/swiftide/pull/958))
### Bug fixes
- [04cd88b](https://github.com/bosun-ai/swiftide/commit/04cd88b74c7a0dd962c093181884db0afe7b6d2d) *(docs)* Replace `feature(doc_auto_cfg)` with `doc(auto_cfg)`
- [7873ce5](https://github.com/bosun-ai/swiftide/commit/7873ce5941a7abf8ed60df4ec2ea8a7a4c1d1316) *(integrations/openai)* Simplefy responses api and improve chat completion request ergonomics ([#956](https://github.com/bosun-ai/swiftide/pull/956))
- [24328d0](https://github.com/bosun-ai/swiftide/commit/24328d07e61a4f02679ee6b63a38561d12acefd4) *(macros)* Ensure deny_unknown_attributes is set on generated args ([#948](https://github.com/bosun-ai/swiftide/pull/948))
- [54245d0](https://github.com/bosun-ai/swiftide/commit/54245d0e70aff580d0e12d68e174026edfdb4801) Update async-openai and fix responses api ([#964](https://github.com/bosun-ai/swiftide/pull/964))
- [72a6c92](https://github.com/bosun-ai/swiftide/commit/72a6c92764aeda4e88a7cf18d26ce600b7ba8a28) Force additionalProperties properly on completion requests ([#949](https://github.com/bosun-ai/swiftide/pull/949))
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.31.3...0.32.0
## [0.31.3](https://github.com/bosun-ai/swiftide/compare/v0.31.2...v0.31.3) - 2025-10-06
### New features
- [a189ae6](https://github.com/bosun-ai/swiftide/commit/a189ae6de51571810f98cf58f9fdb58e7707f29a) *(integrations/openai)* Opt-in responses api ([#943](https://github.com/bosun-ai/swiftide/pull/943))
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.31.2...0.31.3
## [0.31.2](https://github.com/bosun-ai/swiftide/compare/v0.31.1...v0.31.2) - 2025-09-23
### New features
- [f35c9b5](https://github.com/bosun-ai/swiftide/commit/f35c9b507e11f76ff7e78de35843b3310a25f3db) *(agents)* Add builder lite methods to SystemPrompt
- [9f533f5](https://github.com/bosun-ai/swiftide/commit/9f533f57b2c7ed4ac1988f9e3567cda42f64b824) *(agents)* Add helpers to retrieve or mutate the system prompt
- [febb7eb](https://github.com/bosun-ai/swiftide/commit/febb7eb282af98ce1124636cb66a8819265e3585) *(agents)* Support appending any kind of string to default SystemPrompt
- [992478e](https://github.com/bosun-ai/swiftide/commit/992478ec8912554f73e3af6467784fd9326461c5) *(integrations/tree-sitter)* Splitter support for PHP ([#932](https://github.com/bosun-ai/swiftide/pull/932))
### Bug fixes
- [5df7a48](https://github.com/bosun-ai/swiftide/commit/5df7a483bed7d980bceef5e69fd7e1415da7563f) *(agents)* Only log error tool calls if error after hook
- [54dceec](https://github.com/bosun-ai/swiftide/commit/54dceece5b939a0b534891ee5902593920a3fdeb) *(agents/local-executor)* Also respect workdir in read file and write file
- [6a688b4](https://github.com/bosun-ai/swiftide/commit/6a688b4be6a5a443ac72aa8ec0165ce6a0bebf11) *(agents/local-executor)* Respect workdir when running commands
- [5b01c58](https://github.com/bosun-ai/swiftide/commit/5b01c5854432569638fa54225268e48b4133178d) *(langfuse)* Use swiftide Usage in SimplePrompt ([#929](https://github.com/bosun-ai/swiftide/pull/929))
### Miscellaneous
- [ec1e301](https://github.com/bosun-ai/swiftide/commit/ec1e301eec2793613186b9e3bcb02de52741b936) *(agents)* Explicit read file test for local executor
- [8882a53](https://github.com/bosun-ai/swiftide/commit/8882a538f30c7ff457dcb3a1d48e623fbc5aad1d) Improve tests for control tools ([#928](https://github.com/bosun-ai/swiftide/pull/928))
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.31.1...0.31.2
## [0.31.1](https://github.com/bosun-ai/swiftide/compare/v0.31.0...v0.31.1) - 2025-09-16
### Docs
- [866b77a](https://github.com/bosun-ai/swiftide/commit/866b77a8c33b6b7935f260c1df099d89492cb048) *(readme)* Use raw links for images so they work on crates/docs
- [513c143](https://github.com/bosun-ai/swiftide/commit/513c143cd11ae6ddda48f73012844f1f6d026ef7) *(readme)* Remove double back-to-top
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.31.0...0.31.1
## [0.31.0](https://github.com/bosun-ai/swiftide/compare/v0.30.1...v0.31.0) - 2025-09-16
### New features
- [ad6655d](https://github.com/bosun-ai/swiftide/commit/ad6655dc448defc3a9ef8401f0528da11e16a256) *(agents)* Add helper to remove default stop tool from agent builder
- [708ebe4](https://github.com/bosun-ai/swiftide/commit/708ebe436b4d2e9456723cfc95557071f2c636c9) *(agents)* Implement From<SystemPrompt> for SystemPromptBuilder
- [db79f21](https://github.com/bosun-ai/swiftide/commit/db79f21c323abca462a5f469814c4c03cc949b7e) *(agents/tasks)* Add helper to create instant transitions from node ids
- [ac7cd22](https://github.com/bosun-ai/swiftide/commit/ac7cd2209e1792b693acbde251a1aa756bb35541) *(indexing)* [**breaking**] Prepare for multi modal and node transformations with generic indexing ([#899](https://github.com/bosun-ai/swiftide/pull/899))
**BREAKING CHANGE**: Indexing pipelines are now generic over their inner
type. This is a major change that enables major cool stuff in the
future. Most of Swiftide still runs on Node<String>, and will be
migrated when needed/appropriate. A `TextNode` alias is provided and
most indexing traits now take the node's inner generic parameter as
Input/Output associated types.
- [4e20804](https://github.com/bosun-ai/swiftide/commit/4e20804cc78a90e61a1c816abe5810b2a34007af) *(integrations)* More convenient usage reporting via callback ([#897](https://github.com/bosun-ai/swiftide/pull/897))
- [5923532](https://github.com/bosun-ai/swiftide/commit/592353259018b39d4ce43b4a15a9dea1aa1d2904) *(integrations/openai, core)* Add `StructuredPrompt` and implement for OpenAI ([#912](https://github.com/bosun-ai/swiftide/pull/912))
- [d2681d5](https://github.com/bosun-ai/swiftide/commit/d2681d53ce235439885ace40ac08a6d4a058259a) Integrate with Langfuse via tracing and make traces consistent and pretty ([#907](https://github.com/bosun-ai/swiftide/pull/907))
- [b3f18cd](https://github.com/bosun-ai/swiftide/commit/b3f18cd00f9019496274142aa89342da115c6843) Add convenience helpers to get ToolOutput values as ref
### Bug fixes
- [0071b72](https://github.com/bosun-ai/swiftide/commit/0071b721520d585f36d1ec6ff90eb88d669da043) *(agents)* Replace tools when adding multiple with the same name
- [dab4cf7](https://github.com/bosun-ai/swiftide/commit/dab4cf771cd9a6d90ae0985c83171fd87b213cba) *(integrations)* Remove sync requirement in future from `on_usage_async`
- [6702314](https://github.com/bosun-ai/swiftide/commit/6702314eb6d937353324ce601f2a35c2a13d4cc1) *(langfuse)* Ensure all data is on the right generation span ([#913](https://github.com/bosun-ai/swiftide/pull/913))
- [e389c8b](https://github.com/bosun-ai/swiftide/commit/e389c8ba72435ba1c1af109934b2b580fb6be7c1) *(langfuse)* Set type field correctly on `SimplePrompt`
### Miscellaneous
- [5ba9a7d](https://github.com/bosun-ai/swiftide/commit/5ba9a7db6f844687b04c5fa5d9a2119f456108c6) *(agents)* Implement default for `AgentCanFail` tool
- [412dacb](https://github.com/bosun-ai/swiftide/commit/412dacb554d2b1478f3286a47352a6daed3079b9) *(agents/tasks)* Clean up closure api for node registration
- [478d583](https://github.com/bosun-ai/swiftide/commit/478d5830fa194b880595b2c2ef9ef409cc5b34c4) *(openai)* Remove double `include_usage` in complete_stream
### Docs
- [2117190](https://github.com/bosun-ai/swiftide/commit/211719038d1912f3ee3f165cdb721c216fa48286) Update blog post links in readme
- [d5e0323](https://github.com/bosun-ai/swiftide/commit/d5e0323691a22a0b413d14d02e3bafb391e9dd7a) Update readme
- [a574860](https://github.com/bosun-ai/swiftide/commit/a5748604d14e10c4010384e020e09c6082d2a7c1) Update readme
### Style
- [7081e29](https://github.com/bosun-ai/swiftide/commit/7081e291216491618fb07e1ac3f947a99b140c7f) Fmt
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.30.1...0.31.0
## [0.30.1](https://github.com/bosun-ai/swiftide/compare/v0.30.0...v0.30.1) - 2025-08-19
### Bug fixes
- [0114573](https://github.com/bosun-ai/swiftide/commit/011457367b7bfdc207f1f6d9ebfcbf2a2de4ac58) *(agents)* Explicitly handle out of bounds and empty edge cases for message history
- [1005ac2](https://github.com/bosun-ai/swiftide/commit/1005ac219e2078c6ee12b050a7e73d48ef7f46a5) *(core)* Export tokenizer traits from the root crate
- [e4c01e1](https://github.com/bosun-ai/swiftide/commit/e4c01e14fbe89cb5a16beddcb3819b66c7f1a087) *(integrations/tiktoken)* Tiktoken feature flag in root crate
- [d56496d](https://github.com/bosun-ai/swiftide/commit/d56496d60719eea3752f849aee2a780eb435130e) *(integrations/tiktoken)* Fix my inability to count in late hours
### Miscellaneous
- [352bf40](https://github.com/bosun-ai/swiftide/commit/352bf40ad5f74778bf41f00cff936805b8633b30) *(core)* Implement AsRef<str> for ChatMessage
- [aadfb7b](https://github.com/bosun-ai/swiftide/commit/aadfb7b89fe1fd6d04f27bc7209458de3571d1cc) *(integrations/openai)* Concise debug logs and more verbose trace
- [f975d40](https://github.com/bosun-ai/swiftide/commit/f975d40beccdebd98c896d8492243a489a9b287b) *(query)* Reduce debugging noise for queries
### Style
- [6a744e0](https://github.com/bosun-ai/swiftide/commit/6a744e0290ebceca3c14b675a35a460f532c4cff) Fix typos
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.30.0...0.30.1
## [0.30.0](https://github.com/bosun-ai/swiftide/compare/v0.29.0...v0.30.0) - 2025-08-16
### New features
- [dc574b4](https://github.com/bosun-ai/swiftide/commit/dc574b41b259f430bb4dc38338416ea1aa9480bb) *(agents)* Multi agent setup with graph-like Tasks ([#861](https://github.com/bosun-ai/swiftide/pull/861))
- [8740762](https://github.com/bosun-ai/swiftide/commit/87407626ef75c254fae0a677148609738fd64ccc) *(agents)* Allow mutating an existing system prompt in the builder ([#887](https://github.com/bosun-ai/swiftide/pull/887))
- [4bbf207](https://github.com/bosun-ai/swiftide/commit/4bbf207637a1aebe4e0d5b2d4030c3d1f99d4c1c) *(agents/local-executor)* Allow clearing, adding and removing env variable ([#875](https://github.com/bosun-ai/swiftide/pull/875))
- [7873493](https://github.com/bosun-ai/swiftide/commit/787349329e34956bcd205b8da64bb241c15c8e65) *(agents/local-executor)* Support running inline shebang scripts ([#874](https://github.com/bosun-ai/swiftide/pull/874))
- [a6d4379](https://github.com/bosun-ai/swiftide/commit/a6d43794ae8e549b3716ef15344471b22041cbc1) Proper streaming backoff for Chat Completion ([#895](https://github.com/bosun-ai/swiftide/pull/895))
### Bug fixes
- [2b8e138](https://github.com/bosun-ai/swiftide/commit/2b8e1389b630283a2e8c55b9997f09322b7378a9) *(openai)* More gracefully allow handling streaming errors if the client is decorated ([#891](https://github.com/bosun-ai/swiftide/pull/891))
- [f2948b5](https://github.com/bosun-ai/swiftide/commit/f2948b596d7c91c518e700c5d2589fba5a45b649) *(pipeline)* Revert cache nodes after they've been successfully ran ([#800](https://github.com/bosun-ai/swiftide/pull/800)) ([#852](https://github.com/bosun-ai/swiftide/pull/852))
### Performance
- [63a91bd](https://github.com/bosun-ai/swiftide/commit/63a91bd2d8290cbd20f4ae3914d820192ef160d2) Use Cow to in Prompt
### Miscellaneous
- [09f421b](https://github.com/bosun-ai/swiftide/commit/09f421bcc934721ab5fcf3dc2808fe5beefcc9a2) Update rmcp and schemars ([#881](https://github.com/bosun-ai/swiftide/pull/881))
### Docs
- [84ffa45](https://github.com/bosun-ai/swiftide/commit/84ffa4507e57b252f72204f8e0df67191d97fe72) Minimal updates for tasks
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.29.0...0.30.0
## [0.29.0](https://github.com/bosun-ai/swiftide/compare/v0.28.1...v0.29.0) - 2025-07-29
### New features
- [25a86fa](https://github.com/bosun-ai/swiftide/commit/25a86fa0403581c3c5ddc5bd237bee98f41bc153) *(agents)* Lots of utility functions for agents ([#862](https://github.com/bosun-ai/swiftide/pull/862))
- [a70840b](https://github.com/bosun-ai/swiftide/commit/a70840b4dca983bd23b54f1f7cf12b33d60b733c) *(openai)* Add helper to set the end user field for requests
- [f8ddeba](https://github.com/bosun-ai/swiftide/commit/f8ddebaf57001671516db193140c2e5618000206) *(tree-sitter)* Add html support for splitting and parsing ([#850](https://github.com/bosun-ai/swiftide/pull/850))
### Bug fixes
- [aaa5cd9](https://github.com/bosun-ai/swiftide/commit/aaa5cd99d0316dcdc46afb922bbcefdfaa97da86) *(agents)* Add user message before invoking hooks ([#853](https://github.com/bosun-ai/swiftide/pull/853))
- [592be04](https://github.com/bosun-ai/swiftide/commit/592be049b798d80d6dadce6317889a14404643c8) *(agents)* Reduce verbosity of streaming hook ([#854](https://github.com/bosun-ai/swiftide/pull/854))
- [9778295](https://github.com/bosun-ai/swiftide/commit/977829550d58301f53f663b4c25fa5650ab15359) *(agents)* Ensure error causes are always accessible
- [efd35da](https://github.com/bosun-ai/swiftide/commit/efd35da842288616abd55c789b727265bc549ffb) *(docs)* Fix prompt doctests
- [e2670c0](https://github.com/bosun-ai/swiftide/commit/e2670c04d471dd7654e903e79f48bcfe61603b9f) *(duckdb)* Force install and update extensions ([#851](https://github.com/bosun-ai/swiftide/pull/851))
- [6a7ea3b](https://github.com/bosun-ai/swiftide/commit/6a7ea3b1472df209669fdf1231f0bdf4ebe6007f) *(redis)* Redis instrumentation only at trace level
### Miscellaneous
- [0a8ce37](https://github.com/bosun-ai/swiftide/commit/0a8ce373325fac53946c245209afcd8bb7b2caa9) Public chat completion streaming types
- [0000000](https://github.com/bosun-ai/swiftide/commit/0000000) Update Cargo.toml dependencies
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.28.1...0.29.0
## [0.28.1](https://github.com/bosun-ai/swiftide/compare/v0.28.0...v0.28.1) - 2025-07-01
### New features
- [c671e6a](https://github.com/bosun-ai/swiftide/commit/c671e6aec7b381235f8450a8be0cbc766df72985) *(agents)* Add is_approved() and is_refused() to ToolFeedback
### Bug fixes
- [68c5cda](https://github.com/bosun-ai/swiftide/commit/68c5cdafc6e457739bcfeb12d2810350659f2979) *(agents)* Prevent stack overflow when ToolExecutor has ambigious refs
- [07198d2](https://github.com/bosun-ai/swiftide/commit/07198d26389e1606e6e0f552e411196f42cf6600) *(duckdb)* Resolve 'x is an existing extension'
- [e8ecc2f](https://github.com/bosun-ai/swiftide/commit/e8ecc2ff532efd07bd21e5350b8d2b6f600ca1c6) *(qdrant)* Re-export the full qdrant client
- [242b8f5](https://github.com/bosun-ai/swiftide/commit/242b8f5e3d427967aa238115047a58bb9debad3b) *(qdrant)* Re-export qdrant::Filter properly
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.28.0...0.28.1
## [0.28.0](https://github.com/bosun-ai/swiftide/compare/v0.27.2...v0.28.0) - 2025-06-30
### New features
- [9d11386](https://github.com/bosun-ai/swiftide/commit/9d11386c155773fcc77a60591cd57bc366044c71) Token usage metrics for embeddings, SimplePrompt and ChatCompletion with metric-rs ([#813](https://github.com/bosun-ai/swiftide/pull/813))
- [59c8b9c](https://github.com/bosun-ai/swiftide/commit/59c8b9cef721c3861a9d352c7fbef28e27d2f649) Stream files from tool executor for indexing ([#835](https://github.com/bosun-ai/swiftide/pull/835))
### Bug fixes
- [ba6ec04](https://github.com/bosun-ai/swiftide/commit/ba6ec0485dc950e83e91e6a8102becc0e8a13158) *(pipeline)* Cache nodes after they've been successfully ran ([#800](https://github.com/bosun-ai/swiftide/pull/800))
- [d98827c](https://github.com/bosun-ai/swiftide/commit/d98827c9cd7bb476fdda0ef2ebb6939150b8781c) *(qdrant)* Re-export qdrant::Filter
- [275efcd](https://github.com/bosun-ai/swiftide/commit/275efcdf91e85ed4327ffa948dcebe5903b178fa) Mark Loader as Send + Sync
- [5974b72](https://github.com/bosun-ai/swiftide/commit/5974b72de4da2fc18d1f76adde02d02035104d5c) Integrations metrics depends on core/metrics
### Miscellaneous
- [2f8c7cc](https://github.com/bosun-ai/swiftide/commit/2f8c7cc96b194264a47a8fe21abb7af5c63204f6) *(deps)* Up all crates ([#837](https://github.com/bosun-ai/swiftide/pull/837))
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.27.2...0.28.0
## [0.27.2](https://github.com/bosun-ai/swiftide/compare/v0.27.1...v0.27.2) - 2025-06-26
### New features
- [66cd7e9](https://github.com/bosun-ai/swiftide/commit/66cd7e9349673a77d8cc79e6b5acab8d56078a42) *(qdrant)* Add support for a filter in hybrid search ([#830](https://github.com/bosun-ai/swiftide/pull/830))
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.27.1...0.27.2
## [0.27.1](https://github.com/bosun-ai/swiftide/compare/v0.27.0...v0.27.1) - 2025-06-12
### Bug fixes
- [0892151](https://github.com/bosun-ai/swiftide/commit/0892151d2d02c30e38fa8629c386eaf4475da7f8) *(duckdb)* Avoid panic if duckdb gets created twice ([#818](https://github.com/bosun-ai/swiftide/pull/818))
- [0815923](https://github.com/bosun-ai/swiftide/commit/081592334f2bd8c2da30535b4e1b51e8ddd15834) *(tool-executor)* Remove conflicting implementation of AsRef<str> for Output
### Miscellaneous
- [2b64410](https://github.com/bosun-ai/swiftide/commit/2b644109796c8870d29fa1b54f6a0802cae9aaf8) *(tool-executor)* Implement AsRef<str> for CommandOutput
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.27.0...0.27.1
## [0.27.0](https://github.com/bosun-ai/swiftide/compare/v0.26.0...v0.27.0) - 2025-06-09
### New features
- [c636eba](https://github.com/bosun-ai/swiftide/commit/c636ebaa2eb8d4ace1b5a370698c5f2817fc9c99) *(agents)* [**breaking**] Context is now generic over its backend ([#810](https://github.com/bosun-ai/swiftide/pull/810))
**BREAKING CHANGE**: The signature is now slightly different for the
AgentContext. If you have implemented your own for i.e. a persisted
solution, if it's *just that*, the implementation is now a lot more
straightforward with the `MessageHistory` trait.
- [3c937a8](https://github.com/bosun-ai/swiftide/commit/3c937a8ed4f7d28798a24b0d893f1613cd298493) *(agents)* Add helpers for creating tool errors ([#805](https://github.com/bosun-ai/swiftide/pull/805))
- [9e831d3](https://github.com/bosun-ai/swiftide/commit/9e831d3eb072748ebb21c9a16cd7d807b4d42469) *(agents)* [**breaking**] Easy human-in-the-loop flows by decorating tools ([#790](https://github.com/bosun-ai/swiftide/pull/790))
**BREAKING CHANGE**: The `Tool` trait now receives a `ToolCall` as argument
instead of an `Option<&str>`. The latter is still accessible via
`tool_call.args()`.
- [814c217](https://github.com/bosun-ai/swiftide/commit/814c2174c742ff4277246505537070726ce8af92) *(duckdb)* Hybrid Search ([#807](https://github.com/bosun-ai/swiftide/pull/807))
- [254bd3a](https://github.com/bosun-ai/swiftide/commit/254bd3a32ffbd4d06abd6a4f3950a2b8556dc310) *(integrations)* Add kafka as loader and persist support ([#808](https://github.com/bosun-ai/swiftide/pull/808))
- [19a2e94](https://github.com/bosun-ai/swiftide/commit/19a2e94d262cc68c629d88b6b02a72bb9b159036) *(integrations)* Add support for Google Gemini ([#754](https://github.com/bosun-ai/swiftide/pull/754))
- [990fa5e](https://github.com/bosun-ai/swiftide/commit/990fa5e9edffebd9b70da6b57fa454f7318d642d) *(redis)* Support `MessageHistory` for redis ([#811](https://github.com/bosun-ai/swiftide/pull/811))
### Bug fixes
- [ca119bd](https://github.com/bosun-ai/swiftide/commit/ca119bdc473140437abb1bf14b496bb7bd9378de) *(agents)* Ensure approved / refused tool calls are in new completions ([#799](https://github.com/bosun-ai/swiftide/pull/799))
- [df6a12d](https://github.com/bosun-ai/swiftide/commit/df6a12dabe855f351acc3e0d104048321cb9bc0e) *(agents)* Ensure agents with no tools still have the stop tool
- [cd57d12](https://github.com/bosun-ai/swiftide/commit/cd57d1207ced8651a277526d706bc3b7703912c0) *(openai)* Opt-out streaming accumulated response and only get the delta ([#809](https://github.com/bosun-ai/swiftide/pull/809))
- [da2d604](https://github.com/bosun-ai/swiftide/commit/da2d604e7e6209c83f382cf6de44f5f5c2042596) *(redb)* Explicit lifetime in table definition
### Miscellaneous
- [7ac92a4](https://github.com/bosun-ai/swiftide/commit/7ac92a4f2ff4b1d1ba7e86c90c4f6c5c025cabc9) *(agents)* Direct access to executor via context ([#794](https://github.com/bosun-ai/swiftide/pull/794))
- [a21883b](https://github.com/bosun-ai/swiftide/commit/a21883b219a0079c1edc1d3c36d1d06ac906ba18) *(agents)* [**breaking**] Improved naming for existing messages and message history in default context
**BREAKING CHANGE**: Improved naming for existing messages and message history in default context
- [40bfa9c](https://github.com/bosun-ai/swiftide/commit/40bfa9c2d5685e54f247becb49698f8fdc347172) *(indexing)* Implement ChunkerTransformer for closures
- [c8d7ab9](https://github.com/bosun-ai/swiftide/commit/c8d7ab90c86e674d5df5f4985121e4e81d1e4a37) *(integrations)* Improved warning when a qdrant collection exists
- [d6769eb](https://github.com/bosun-ai/swiftide/commit/d6769eba0b87750fd3173ba73315973f720263ec) *(tree-sitter)* Implement Eq, Hash and AsRefStr for SupportedLanguages
- [04ec29d](https://github.com/bosun-ai/swiftide/commit/04ec29d7240a8542ccd1d530bb9b104bcd57631e) Consistent logging for indexing pipeline ([#792](https://github.com/bosun-ai/swiftide/pull/792))
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.26.0...0.27.0
## [0.26.0](https://github.com/bosun-ai/swiftide/compare/v0.25.1...v0.26.0) - 2025-05-06
### New features
- [11051d5](https://github.com/bosun-ai/swiftide/commit/11051d5a1df6ea158ee84de274767fbdc70cc74e) *(agents)* `tools` on `Agent` is now public and can be used in hooks
- [ebe68c1](https://github.com/bosun-ai/swiftide/commit/ebe68c104b8198b80ee5ee1f451c3272ce36841c) *(integrations)* Streaming chat completions for anthropic ([#773](https://github.com/bosun-ai/swiftide/pull/773))
- [7f5b345](https://github.com/bosun-ai/swiftide/commit/7f5b345115a3443afc9b32ca54a292fae3f5d38b) *(integrations)* Streaming chat completions for OpenAI ([#741](https://github.com/bosun-ai/swiftide/pull/741))
- [e2278fb](https://github.com/bosun-ai/swiftide/commit/e2278fb133e51f15025e114135a2bc29157242ee) *(integrations)* Customize common default settings for OpenAI requests ([#775](https://github.com/bosun-ai/swiftide/pull/775))
- [c563cf2](https://github.com/bosun-ai/swiftide/commit/c563cf270c60957dbb948113fb2299ec5eb7ed58) *(treesitter)* Add elixir support ([#776](https://github.com/bosun-ai/swiftide/pull/776))
- [13ae991](https://github.com/bosun-ai/swiftide/commit/13ae991b632cc95d1ae0bc7107146a145af59c74) Add usage to chat completion response ([#774](https://github.com/bosun-ai/swiftide/pull/774))
### Bug fixes
- [7836f9f](https://github.com/bosun-ai/swiftide/commit/7836f9ff31f2abeab966f80a91eab32054e61ff1) *(agents)* Use an RwLock to properly close a running MCP server
- [0831c98](https://github.com/bosun-ai/swiftide/commit/0831c982cd6bb0b442396268c0681c908b6dadc2) *(openai)* Disable parallel tool calls by default
### Miscellaneous
- [18dc99c](https://github.com/bosun-ai/swiftide/commit/18dc99ca1f597586ffed36e163f04f7c3689d2be) *(integrations)* Use generics for all openai variants ([#764](https://github.com/bosun-ai/swiftide/pull/764))
- [2a9d062](https://github.com/bosun-ai/swiftide/commit/2a9d062c6e19721c49c6233690ac71e9e28b6a04) *(openai)* Consistent exports across providers
- [4df6dbf](https://github.com/bosun-ai/swiftide/commit/4df6dbf17fd4b87afc2cf7159c6518fcebc27438) Export macros from main crate and enable them by default ([#778](https://github.com/bosun-ai/swiftide/pull/778))
- [8b30fde](https://github.com/bosun-ai/swiftide/commit/8b30fde5e20ecbd4f0387c26e441d39f78ddca32) Rust like its 2024 ([#763](https://github.com/bosun-ai/swiftide/pull/763))
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.25.1...0.26.0
## [0.25.1](https://github.com/bosun-ai/swiftide/compare/v0.25.0...v0.25.1) - 2025-04-17
### Bug fixes
- [7102091](https://github.com/bosun-ai/swiftide/commit/710209123ba6972cd11fb0f3d364c9c83478e184) *(agents)* AgentBuilder and AgentBuilderError should be public
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.25.0...0.25.1
# Changelog
All notable changes to this project will be documented in this file.
## [0.25.0](https://github.com/bosun-ai/swiftide/compare/v0.24.0...v0.25.0) - 2025-04-16
### New features
- [4959ddf](https://github.com/bosun-ai/swiftide/commit/4959ddfe00e0424215dd9bd3e8a6acb579cc056c) *(agents)* Restore agents from an existing message history ([#742](https://github.com/bosun-ai/swiftide/pull/742))
- [6efd15b](https://github.com/bosun-ai/swiftide/commit/6efd15bf7b88d8f8656c4017676baf03a3bb510e) *(agents)* Agents now take an Into Prompt when queried ([#743](https://github.com/bosun-ai/swiftide/pull/743))
### Bug fixes
- [5db4de2](https://github.com/bosun-ai/swiftide/commit/5db4de2f0deb2028f5ffaf28b4d26336840e908c) *(agents)* Properly support nullable types for MCP tools ([#740](https://github.com/bosun-ai/swiftide/pull/740))
- [dd2ca86](https://github.com/bosun-ai/swiftide/commit/dd2ca86b214e8268262075a513711d6b9c793115) *(agents)* Do not log twice if mcp failed to stop
- [5fea2e2](https://github.com/bosun-ai/swiftide/commit/5fea2e2acdca0782f88d4274bb8e106b48e1efe4) *(indexing)* Split pipeline concurrently ([#749](https://github.com/bosun-ai/swiftide/pull/749))
### Miscellaneous
- [0000000](https://github.com/bosun-ai/swiftide/commit/0000000) Update Cargo.toml dependencies
- [0f2605a](https://github.com/bosun-ai/swiftide/commit/0f2605a61240d2c99e10ce6f5a91e6568343a78b) Pretty print RAGAS output ([#745](https://github.com/bosun-ai/swiftide/pull/745))
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.24.0...0.25.0
## [0.24.0](https://github.com/bosun-ai/swiftide/compare/v0.23.0...v0.24.0) - 2025-04-11
### New features
- [3117fc6](https://github.com/bosun-ai/swiftide/commit/3117fc62c146b0bf0949adb3cfe4e6c7f40427f7) Introduce LanguageModelError for LLM traits and an optional backoff decorator ([#630](https://github.com/bosun-ai/swiftide/pull/630))
### Bug fixes
- [0134dae](https://github.com/bosun-ai/swiftide/commit/0134daebef5d47035e986d30e1fa8f2c751c2c48) *(agents)* Gracefully stop mcp service on drop ([#734](https://github.com/bosun-ai/swiftide/pull/734))
### Miscellaneous
- [e872c5b](https://github.com/bosun-ai/swiftide/commit/e872c5b24388754b371d9f0c7faad8647ad4733b) Core test utils available behind feature flag ([#730](https://github.com/bosun-ai/swiftide/pull/730))
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.23.0...0.24.0
## [0.23.0](https://github.com/bosun-ai/swiftide/compare/v0.22.8...v0.23.0) - 2025-04-08
### New features
- [fca4165](https://github.com/bosun-ai/swiftide/commit/fca4165c5be4b14cdc3d20ed8215ef64c5fd69a9) *(agents)* Return typed errors and yield error in `on_stop` ([#725](https://github.com/bosun-ai/swiftide/pull/725))
- [29352e6](https://github.com/bosun-ai/swiftide/commit/29352e6d3dc51779f3202e0e9936bf72e0b61605) *(agents)* Add `on_stop` hook and `stop` now takes a `StopReason` ([#724](https://github.com/bosun-ai/swiftide/pull/724))
- [a85cd8e](https://github.com/bosun-ai/swiftide/commit/a85cd8e2d014f198685ee6bfcfdf17f7f34acf91) *(macros)* Support generics in Derive for tools ([#720](https://github.com/bosun-ai/swiftide/pull/720))
- [52c44e9](https://github.com/bosun-ai/swiftide/commit/52c44e9b610c0ba4bf144881c36eacc3a0d10e53) Agent mcp client support ([#658](https://github.com/bosun-ai/swiftide/pull/658))
````text
Adds support for agents to use tools from MCP servers. All transports
are supported via the `rmcp` crate.
Additionally adds the possibility to add toolboxes to agents (of which
MCP is one). Tool boxes declare their available tools at runtime, like
tool box.
````
### Miscellaneous
- [69706ec](https://github.com/bosun-ai/swiftide/commit/69706ec6630b70ea9d332c151637418736437a99) [**breaking**] Remove templates ([#716](https://github.com/bosun-ai/swiftide/pull/716))
````text
Template / prompt interface got confusing and bloated. This removes
`Template` fully, and changes Prompt such that it can either ref to a
one-off, or to a template named compiled in the swiftide repository.
````
**BREAKING CHANGE**: This removes `Template` from Swiftide and simplifies
the whole setup significantly. The internal Swiftide Tera repository can
still be extended like with Templates. Same behaviour with less code and
abstractions.
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.22.8...0.23.0
## [0.22.8](https://github.com/bosun-ai/swiftide/compare/v0.22.7...v0.22.8) - 2025-04-02
### Bug fixes
- [6b4dfca](https://github.com/bosun-ai/swiftide/commit/6b4dfca822f39b3700d60e6ea31b9b48ccd6d56f) Tool macros should work with latest darling version ([#712](https://github.com/bosun-ai/swiftide/pull/712))
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.22.7...0.22.8
## [0.22.7](https://github.com/bosun-ai/swiftide/compare/v0.22.6...v0.22.7) - 2025-03-30
### Bug fixes
- [b0001fb](https://github.com/bosun-ai/swiftide/commit/b0001fbb12cf6bb85fc4d5a8ef0968219e8c78db) *(duckdb)* Upsert is now opt in as it requires duckdb >= 1.2 ([#708](https://github.com/bosun-ai/swiftide/pull/708))
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.22.6...0.22.7
## [0.22.6](https://github.com/bosun-ai/swiftide/compare/v0.22.5...v0.22.6) - 2025-03-27
### New features
- [a05b3c8](https://github.com/bosun-ai/swiftide/commit/a05b3c8e7c4224c060215c34490b2ea7729592bf) *(macros)* Support optional values and make them even nicer to use ([#703](https://github.com/bosun-ai/swiftide/pull/703))
### Bug fixes
- [1866d5a](https://github.com/bosun-ai/swiftide/commit/1866d5a081f40123e607208d04403fb98f34c057) *(integrations)* Loosen up duckdb requirements even more and make it more flexible for version requirements ([#706](https://github.com/bosun-ai/swiftide/pull/706))
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.22.5...0.22.6
# Changelog
All notable changes to this project will be documented in this file.
## [0.22.5](https://github.com/bosun-ai/swiftide/compare/v0.22.4...v0.22.5) - 2025-03-23
### New features
- [eb4e044](https://github.com/bosun-ai/swiftide/commit/eb4e0442293e17722743aa2b88d8dd7582dd9236) Estimate tokens for OpenAI like apis with tiktoken-rs ([#699](https://github.com/bosun-ai/swiftide/pull/699))
### Miscellaneous
- [345c57a](https://github.com/bosun-ai/swiftide/commit/345c57a663dd0d315a28f0927c5d598ba21d019d) Improve file loader logging ([#695](https://github.com/bosun-ai/swiftide/pull/695))
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.22.4...0.22.5
## [0.22.4](https://github.com/bosun-ai/swiftide/compare/v0.22.3...v0.22.4) - 2025-03-17
### Bug fixes
- [4ec00bb](https://github.com/bosun-ai/swiftide/commit/4ec00bb0fed214f27629f32569406bfa2c786dd7) *(integrations)* Add chrono/utc feature flag when using qdrant ([#684](https://github.com/bosun-ai/swiftide/pull/684))
````text
The Qdrant integration calls chrono::Utc::now(), which requires the now
feature flag to be enabled in the chrono crate when using qdrant
````
- [0b204d9](https://github.com/bosun-ai/swiftide/commit/0b204d90a68978bb4b75516c537a56d665771c55) Ensure `groq`, `fastembed`, `test-utils` features compile individually ([#689](https://github.com/bosun-ai/swiftide/pull/689))
### Miscellaneous
- [bd4ef97](https://github.com/bosun-ai/swiftide/commit/bd4ef97f2b9207b5ac03d610b76bdb3440e3d5c0) Include filenames in errors in file io ([#694](https://github.com/bosun-ai/swiftide/pull/694))
````text
Uses fs-err crate to automatically include filenames in the error
messages
````
- [9453e06](https://github.com/bosun-ai/swiftide/commit/9453e06d5338c99cec5f51b085739cc30a5f12be) Use std::sync::Mutex instead of tokio mutex ([#693](https://github.com/bosun-ai/swiftide/pull/693))
- [b3456e2](https://github.com/bosun-ai/swiftide/commit/b3456e25af99f661aff1779ae5f2d4da460f128c) Log qdrant setup messages at debug level ([#696](https://github.com/bosun-ai/swiftide/pull/696))
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.22.3...0.22.4
## [0.22.3](https://github.com/bosun-ai/swiftide/compare/v0.22.2...v0.22.3) - 2025-03-13
### Miscellaneous
- [834fcd3](https://github.com/bosun-ai/swiftide/commit/834fcd3b2270904bcfe8998a7015de15626128a8) Update duckdb to 1.2.1 ([#680](https://github.com/bosun-ai/swiftide/pull/680))
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.22.2...0.22.3
## [0.22.2](https://github.com/bosun-ai/swiftide/compare/v0.22.1...v0.22.2) - 2025-03-11
### Miscellaneous
- [0000000](https://github.com/bosun-ai/swiftide/commit/0000000) Update Cargo.toml dependencies
- [e1c097d](https://github.com/bosun-ai/swiftide/commit/e1c097da885374ec9320c1847a7dda7c5d9d41cb) Disable default features on all dependencies ([#675](https://github.com/bosun-ai/swiftide/pull/675))
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.22.1...0.22.2
# Changelog
All notable changes to this project will be documented in this file.
## [0.22.1](https://github.com/bosun-ai/swiftide/compare/v0.22.0...v0.22.1) - 2025-03-09
### New features
- [474d612](https://github.com/bosun-ai/swiftide/commit/474d6122596e71132e35fcb181302dfed7794561) *(integrations)* Add Duckdb support ([#578](https://github.com/bosun-ai/swiftide/pull/578))
````text
Adds support for Duckdb. Persist, Retrieve (Simple and Custom), and
NodeCache are implemented. Metadata and full upsert are not. Once 1.2
has its issues fixed, it's easy to add.
````
- [4cf417c](https://github.com/bosun-ai/swiftide/commit/4cf417c6a818fbec2641ad6576b4843412902bf6) *(treesitter)* C and C++ support for splitter only ([#663](https://github.com/bosun-ai/swiftide/pull/663))
### Bug fixes
- [590eaeb](https://github.com/bosun-ai/swiftide/commit/590eaeb3c6b5c14c56c925e038528326f88508a1) *(integrations)* Make openai parallel_tool_calls an Option ([#664](https://github.com/bosun-ai/swiftide/pull/664))
````text
o3-mini needs to omit parallel_tool_calls - so we need to allow for a
None option to not include that field
````
### Miscellaneous
- [0000000](https://github.com/bosun-ai/swiftide/commit/0000000) Update Cargo.toml dependencies
- [d864c7e](https://github.com/bosun-ai/swiftide/commit/d864c7e72ba01d3f187e4f6ab6ad3e6244ae0dc4) Downgrade duckdb to 1.1.1 and fix ci ([#671](https://github.com/bosun-ai/swiftide/pull/671))
- [9b685b3](https://github.com/bosun-ai/swiftide/commit/9b685b3281d9694c5faa58890a9aba32cba90f1c) Update and loosen deps ([#670](https://github.com/bosun-ai/swiftide/pull/670))
- [a64ca16](https://github.com/bosun-ai/swiftide/commit/a64ca1656b903a680cc70ac7b33ac40d9d356d4a) Tokio_stream features should include `time`
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.22.0...0.22.1
## [0.22.0](https://github.com/bosun-ai/swiftide/compare/v0.21.1...v0.22.0) - 2025-03-03
### New features
- [a754846](https://github.com/bosun-ai/swiftide/commit/a7548463367023d3e5a3a25dd84f06632b372f18) *(agents)* Implement Serialize and Deserialize for chat messages
````text
Persist, retry later, evaluate it completions in a script, you name it.
````
- [0a592c6](https://github.com/bosun-ai/swiftide/commit/0a592c67621f3eba4ad6e0bfd5a539e19963cf17) *(indexing)* Add `iter()` for file loader ([#655](https://github.com/bosun-ai/swiftide/pull/655))
````text
Allows playing with the iterator outside of the stream.
Relates to https://github.com/bosun-ai/kwaak/issues/337
````
- [57116e9](https://github.com/bosun-ai/swiftide/commit/57116e9a30c722f47398be61838cc1ef4d0bbfac) Groq ChatCompletion ([#650](https://github.com/bosun-ai/swiftide/pull/650))
````text
Use the new generics to _just-make-it-work_.
````
- [4fd3259](https://github.com/bosun-ai/swiftide/commit/4fd325921555a14552e33b2481bc9dfcf0c313fc) Continue Agent on Tool Failure ([#628](https://github.com/bosun-ai/swiftide/pull/628))
````text
Ensure tool calls and responses are always balanced, even when the tool retry limit is reached
https://github.com/bosun-ai/kwaak/issues/313
````
### Miscellaneous
- [0000000](https://github.com/bosun-ai/swiftide/commit/0000000) Update Cargo.toml dependencies
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.21.1...0.22.0
## [0.21.1](https://github.com/bosun-ai/swiftide/compare/v0.21.0...v0.21.1) - 2025-02-28
### Bug fixes
- [f418c5e](https://github.com/bosun-ai/swiftide/commit/f418c5ee2f0d3ee87fb3715ec6b1d7ecc80bf714) *(ci)* Run just a single real rerank test to please the flaky gods
- [e387e82](https://github.com/bosun-ai/swiftide/commit/e387e826200e1bc0a608e1f680537751cfc17969) *(lancedb)* Update Lancedb to 0.17 and pin Arrow to a lower version
### Miscellaneous
- [0000000](https://github.com/bosun-ai/swiftide/commit/0000000) Update Cargo.toml dependencies
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.21.0...0.21.1
## [0.21.0](https://github.com/bosun-ai/swiftide/compare/v0.20.1...v0.21.0) - 2025-02-25
### New features
- [12a9873](https://github.com/bosun-ai/swiftide/commit/12a98736ab171c25d860000bb95b1e6e318758fb) *(agents)* Improve flexibility for tool generation (#641)
````text
Previously ToolSpec and name in the `Tool` trait worked with static.
With these changes, there is a lot more flexibility, allowing for i.e.
run-time tool generation.
````
### Miscellaneous
- [0000000](https://github.com/bosun-ai/swiftide/commit/0000000) Update Cargo.toml dependencies
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.20.1...0.21.0
## [0.20.1](https://github.com/bosun-ai/swiftide/compare/v0.20.0...v0.20.1) - 2025-02-21
### Bug fixes
- [0aa1248](https://github.com/bosun-ai/swiftide/commit/0aa124819d836f37d1fcaf88e6f88b5affb46cf9) *(indexing)* Handle invalid utf-8 in fileloader lossy (#632)
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.20.0...0.20.1
# Changelog
All notable changes to this project will be documented in this file.
## [0.20.0](https://github.com/bosun-ai/swiftide/compare/v0.19.0...v0.20.0) - 2025-02-18
### New features
- [5d85d14](https://github.com/bosun-ai/swiftide/commit/5d85d142339d24c793bd89a907652bede0d1c94d) *(agents)* Add support for numbers, arrays and booleans in tool args (#562)
````text
Add support for numbers, arrays and boolean types in the
`#[swiftide_macros::tool]` attribute macro. For enum and object a custom
implementation is now properly supported as well, but not via the macro.
For now, tools using Derive also still need a custom implementation.
````
- [b09afed](https://github.com/bosun-ai/swiftide/commit/b09afed72d463d8b59ffa2b325eb6a747c88c87f) *(query)* Add support for reranking with `Fastembed` and multi-document retrieval (#508)
### Miscellaneous
- [0000000](https://github.com/bosun-ai/swiftide/commit/0000000) Update Cargo.toml dependencies
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.19.0...0.20.0
## [0.19.0](https://github.com/bosun-ai/swiftide/compare/v0.18.2...v0.19.0) - 2025-02-13
### New features
- [fa5112c](https://github.com/bosun-ai/swiftide/commit/fa5112c9224fdf5984d26db669f04dedc8ebb561) *(agents)* By default retry failed tools with LLM up to 3 times (#609)
````text
Specifically meant for LLMs sending invalid JSON, these tool calls are
now retried by feeding back the error into the LLM up to a limit
(default 3).
````
- [14f4778](https://github.com/bosun-ai/swiftide/commit/14f47780b4294be3a9fa3670aa18a952ad7e9d6e) *(integrations)* Parallel tool calling in OpenAI is now configurable (#611)
````text
Adds support reasoning models in agents and for chat completions.
````
- [37a1a2c](https://github.com/bosun-ai/swiftide/commit/37a1a2c7bfd152db56ed929e0ea1ab99080e640d) *(integrations)* Add system prompts as `system` instead of message in Anthropic requests
### Bug fixes
- [ab27c75](https://github.com/bosun-ai/swiftide/commit/ab27c75b8f4a971cb61e88b26d94231afd35c871) *(agents)* Add back anyhow catch all for failed tools
- [2388f18](https://github.com/bosun-ai/swiftide/commit/2388f187966d996ede4ff42c71521238b63d129c) *(agents)* Use name/arg hash on tool retries (#612)
- [da55664](https://github.com/bosun-ai/swiftide/commit/da5566473e3f8874fce427ceb48a15d002737d07) *(integrations)* Scraper should stop when finished (#614)
### Miscellaneous
- [990a8ea](https://github.com/bosun-ai/swiftide/commit/990a8eaeffdbd447bb05a0b01aa65a39a7c9cacf) *(deps)* Update tree-sitter (#616)
- [0000000](https://github.com/bosun-ai/swiftide/commit/0000000) Update Cargo.toml dependencies
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.18.2...0.19.0
## [0.18.2](https://github.com/bosun-ai/swiftide/compare/v0.18.1...v0.18.2) - 2025-02-11
### New features
- [50ffa15](https://github.com/bosun-ai/swiftide/commit/50ffa156e28bb085a61a376bab71c135bc09622f) Anthropic support for prompts and agents (#602)
### Bug fixes
- [8cf70e0](https://github.com/bosun-ai/swiftide/commit/8cf70e08787d1376ba20001cc9346767d8bd84ef) *(integrations)* Ensure anthropic tool call format is consistent with specs
### Miscellaneous
- [98176c6](https://github.com/bosun-ai/swiftide/commit/98176c603b61e3971ca5583f9f4346eb5b962d51) Clippy
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.18.1...0.18.2
# Changelog
All notable changes to this project will be documented in this file.
## [0.18.1](https://github.com/bosun-ai/swiftide/compare/v0.18.0...v0.18.1) - 2025-02-09
### New features
- [78bf0e0](https://github.com/bosun-ai/swiftide/commit/78bf0e004049c852d4e32c0cd67725675b1250f9) *(agents)* Add optional limit for agent iterations (#599)
- [592e5a2](https://github.com/bosun-ai/swiftide/commit/592e5a2ca4b0f09ba6a9b20cef105539cb7a7909) *(integrations)* Support Azure openai via generics (#596)
- [c8f2eed](https://github.com/bosun-ai/swiftide/commit/c8f2eed9964341ac2dad611fc730dc234436430a) *(tree-sitter)* Add solidity support (#597)
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.18.0...0.18.1
# Changelog
All notable changes to this project will be documented in this file.
## [0.18.0](https://github.com/bosun-ai/swiftide/compare/v0.17.5...v0.18.0) - 2025-02-01
### New features
- [de46656](https://github.com/bosun-ai/swiftide/commit/de46656f80c5cf68cc192d21b5f34eb3e0667a14) *(agents)* Add `on_start` hook (#586)
- [c551f1b](https://github.com/bosun-ai/swiftide/commit/c551f1becfd1750ce480a00221a34908db61e42f) *(integrations)* OpenRouter support (#589)
````text
Adds OpenRouter support. OpenRouter allows you to use any LLM via their
own api (with a minor upsell).
````
### Bug fixes
- [3ea5839](https://github.com/bosun-ai/swiftide/commit/3ea583971c0d2cc5ef0594eaf764ea149bacd1d8) *(redb)* Disable per-node tracing
### Miscellaneous
- [0000000](https://github.com/bosun-ai/swiftide/commit/0000000) Update Cargo.lock dependencies
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.17.5...0.18.0
## [0.17.5](https://github.com/bosun-ai/swiftide/compare/v0.17.4...v0.17.5) - 2025-01-27
### New features
- [825a52e](https://github.com/bosun-ai/swiftide/commit/825a52e70a74e4621d370485346a78d61bf5d7a9) *(agents)* Tool description now also accepts paths (i.e. a const) (#580)
### Miscellaneous
- [0000000](https://github.com/bosun-ai/swiftide/commit/0000000) Update Cargo.lock dependencies
- [0000000](https://github.com/bosun-ai/swiftide/commit/0000000) Update Cargo.toml dependencies
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.17.4...0.17.5
## [0.17.4](https://github.com/bosun-ai/swiftide/compare/v0.17.3...v0.17.4) - 2025-01-24
### Bug fixes
- [0d9e250](https://github.com/bosun-ai/swiftide/commit/0d9e250e2512fe9c66d5dfd2ac688dcd56bd07e9) *(tracing)* Use `or_current()` to prevent orphaned tracing spans (#573)
````text
When a span is emitted that would be selected by the subscriber, but we
instrument its closure with a span that would not be selected by the
subscriber, the span would be emitted as an orphan (with a new
`trace_id`) making them hard to find and cluttering dashboards.
This situation is also documented here:
https://docs.rs/tracing/latest/tracing/struct.Span.html#method.or_current
````
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.17.3...0.17.4
## [0.17.3](https://github.com/bosun-ai/swiftide/compare/v0.17.2...v0.17.3) - 2025-01-24
### New features
- [8e22442](https://github.com/bosun-ai/swiftide/commit/8e2244241f16fff77591cf04f40725ad0b05ca81) *(integrations)* Support Qdrant 1.13 (#571)
### Bug fixes
- [c5408a9](https://github.com/bosun-ai/swiftide/commit/c5408a96fbed6207022eb493da8d2cbb0fea7ca6) *(agents)* Io::Error should always be a NonZeroExit error for tool executors (#570)
### Miscellaneous
- [0000000](https://github.com/bosun-ai/swiftide/commit/0000000) Update Cargo.toml dependencies
- [0000000](https://github.com/bosun-ai/swiftide/commit/0000000) Update Cargo.lock dependencies
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.17.2...0.17.3
## [0.17.2](https://github.com/bosun-ai/swiftide/compare/v0.17.1...v0.17.2) - 2025-01-21
### Bug fixes
- [47db5ab](https://github.com/bosun-ai/swiftide/commit/47db5ab138384a6c235a90024470e9ab96751cc8) *(agents)* Redrive uses the correct pointer and works as intended
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.17.1...0.17.2
## [0.17.1](https://github.com/bosun-ai/swiftide/compare/v0.17.0...v0.17.1) - 2025-01-20
### New features
- [e4e4468](https://github.com/bosun-ai/swiftide/commit/e4e44681b65b07b5f1e987ce468bdcda61eb30da) *(agents)* Implement AgentContext for smart dyn pointers
- [70181d9](https://github.com/bosun-ai/swiftide/commit/70181d9642aa2c0a351b9f42be1a8cdbd83c9075) *(agents)* Add pub accessor for agent context (#558)
- [274d9d4](https://github.com/bosun-ai/swiftide/commit/274d9d46f39ac2e28361c4881c6f8f7e20dd8753) *(agents)* Preprocess tool calls to fix common, fixable errors (#560)
````text
OpenAI has a tendency to sometimes send double keys. With this, Swiftide
will now take the first key and ignore any duplicates after that. Sets the stage for any future preprocessing before it gets strictly parsed by serde.
````
- [0f0f491](https://github.com/bosun-ai/swiftide/commit/0f0f491b2621ad82389a57bdb521fcf4021b7d7a) *(integrations)* Add Dashscope support (#543)
````text
---------
````
### Bug fixes
- [b2b15ac](https://github.com/bosun-ai/swiftide/commit/b2b15ac073e4f6b035239791a056fbdf6f6e704e) *(openai)* Enable strict mode for tool calls (#561)
````text
Ensures openai sticks much better to the schema and avoids accidental
mistakes.
````
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.17.0...0.17.1
## [0.17.0](https://github.com/bosun-ai/swiftide/compare/v0.16.4...v0.17.0) - 2025-01-16
### New features
- [835c35e](https://github.com/bosun-ai/swiftide/commit/835c35e7d74811daa90f7ca747054d1919633058) *(agents)* Redrive completions manually on failure (#551)
````text
Sometimes LLMs fail a completion without deterministic errors, or the
user case where you just want to retry. `redrive` can now be called on a
context, popping any new messages (if any), and making the messages
available again to the agent.
````
- [f83f3f0](https://github.com/bosun-ai/swiftide/commit/f83f3f03bbf6a9591b54521dde91bf1a5ed19c5c) *(agents)* Implement ToolExecutor for common dyn pointers (#549)
- [7f85735](https://github.com/bosun-ai/swiftide/commit/7f857358e46e825494ba927dffb33c3afa0d762e) *(query)* Add custom lancedb query generation for lancedb search (#518)
- [ce4e34b](https://github.com/bosun-ai/swiftide/commit/ce4e34be42ce1a0ab69770d03695bd67f99a8739) *(tree-sitter)* Add golang support (#552)
````text
Seems someone conveniently forgot to add Golang support for the
splitter.
````
### Miscellaneous
- [0000000](https://github.com/bosun-ai/swiftide/commit/0000000) Update Cargo.lock dependencies
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.16.4...0.17.0
## [0.16.4](https://github.com/bosun-ai/swiftide/compare/v0.16.3...v0.16.4) - 2025-01-12
### New features
- [c919484](https://github.com/bosun-ai/swiftide/commit/c9194845faa12b8a0fcecdd65f8ec9d3d221ba08) Ollama via async-openai with chatcompletion support (#545)
````text
Adds support for chatcompletions (agents) for ollama. SimplePrompt and embeddings now use async-openai underneath.
Copy pasted as I expect some differences in the future.
````
### Miscellaneous
- [0000000](https://github.com/bosun-ai/swiftide/commit/0000000) Update Cargo.toml dependencies
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.16.3...0.16.4
## [0.16.3](https://github.com/bosun-ai/swiftide/compare/v0.16.2...v0.16.3) - 2025-01-10
### New features
- [b66bd79](https://github.com/bosun-ai/swiftide/commit/b66bd79070772d7e1bfe10a22531ccfd6501fc2a) *(fastembed)* Add support for jina v2 code (#541)
````text
Add support for jina v2 code in fastembed.
````
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.16.2...0.16.3
## [0.16.2](https://github.com/bosun-ai/swiftide/compare/v0.16.1...v0.16.2) - 2025-01-08
### Bug fixes
- [2226755](https://github.com/bosun-ai/swiftide/commit/2226755f367d9006870a2dea2063655a7901d427) Explicit cast on tools to Box<dyn> to make analyzer happy (#536)
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.16.1...0.16.2
## [0.16.1](https://github.com/bosun-ai/swiftide/compare/v0.16.0...v0.16.1) - 2025-01-06
### Bug fixes
- [d198bb0](https://github.com/bosun-ai/swiftide/commit/d198bb0807f5d5b12a51bc76721cc945be8e65b9) *(prompts)* Skip rendering prompts if no context and forward as is (#530)
````text
Fixes an issue if strings suddenly include jinja style values by
mistake. Bonus performance boost.
````
- [4e8d59f](https://github.com/bosun-ai/swiftide/commit/4e8d59fbc0fbe72dd0f8d6a95e6e335280eb88e3) *(redb)* Log errors and return uncached instead of panicing (#531)
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.16.0...0.16.1
## [0.16.0](https://github.com/bosun-ai/swiftide/compare/v0.15.0...v0.16.0) - 2025-01-02
### New features
- [52e341e](https://github.com/bosun-ai/swiftide/commit/52e341ee9777d04f9fb07054980ba087c55c033e) *(lancedb)* Public method for opening table (#514)
- [3254bd3](https://github.com/bosun-ai/swiftide/commit/3254bd34d0eeb038c8aa6ea56ac2940b3ca81960) *(query)* Generic templates with document rendering (#520)
````text
Reworks `PromptTemplate` to a more generic `Template`, such that they
can also be used elsewhere. This deprecates `PromptTemplate`.
As an example, an optional `Template` in the `Simple` answer
transformer, which can be used to customize the output of retrieved
documents. This has excellent synergy with the metadata changes in #504.
````
- [235780b](https://github.com/bosun-ai/swiftide/commit/235780b941a0805b69541f0f4c55c3404091baa8) *(query)* Documents as first class citizens (#504)
````text
For simple RAG, just adding the content of a retrieved document might be
enough. However, in more complex use cases, you might want to add
metadata as well, as is or for conditional formatting.
For instance, when dealing with large amounts of chunked code, providing
the path goes a long way. If generated metadata is good enough, could be
useful as well.
With this retrieved Documents are treated as first class citizens,
including any metadata as well. Additionally, this also paves the way
for multi retrieval (and multi modal).
````
- [584695e](https://github.com/bosun-ai/swiftide/commit/584695e4841a3c9341e521b81e9f254270b3416e) *(query)* Add custom SQL query generation for pgvector search (#478)
````text
Adds support for custom retrieval queries with the sqlx query builder for PGVector. Puts down the fundamentals for custom query building for any retriever.
---------
````
- [b55bf0b](https://github.com/bosun-ai/swiftide/commit/b55bf0b318042459a6983cf725078c4da662618b) *(redb)* Public database and table definition (#510)
- [176378f](https://github.com/bosun-ai/swiftide/commit/176378f846ddecc3ddba74f6b423338b793f29b4) Implement traits for all Arc dynamic dispatch (#513)
````text
If you use i.e. a `Persist` or a `NodeCache` outside swiftide as well, and you already have it Arc'ed, now it just works.
````
- [dc9881e](https://github.com/bosun-ai/swiftide/commit/dc9881e48da7fb5dc744ef33b1c356b4152d00d3) Allow opt out of pipeline debug truncation
### Bug fixes
- [2831101](https://github.com/bosun-ai/swiftide/commit/2831101daa2928b5507116d9eb907d98fb77bf50) *(lancedb)* Metadata should be nullable in lancedb (#515)
- [c35df55](https://github.com/bosun-ai/swiftide/commit/c35df5525d4d88cfb9ada89a060e1ab512b471af) *(macros)* Explicit box dyn cast fixing Rust Analyzer troubles (#523)
### Miscellaneous
- [1bbbb0e](https://github.com/bosun-ai/swiftide/commit/1bbbb0e548cafa527c34856bd9ac6f76aca2ab5f) Clippy
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.15.0...0.16.0
## [0.15.0](https://github.com/bosun-ai/swiftide/compare/v0.14.4...v0.15.0) - 2024-12-23
### New features
- [a1b9a2d](https://github.com/bosun-ai/swiftide/commit/a1b9a2d37715420d3e2cc80d731e3713a22c7c50) *(query)* Ensure concrete names for transformations are used when debugging (#496)
- [7779c44](https://github.com/bosun-ai/swiftide/commit/7779c44de3581ac865ac808637c473525d27cabb) *(query)* Ensure query pipeline consistently debug logs in all other stages too
- [55dde88](https://github.com/bosun-ai/swiftide/commit/55dde88df888b60a7ccae5a68ba03d20bc1f57df) *(query)* Debug full retrieved documents when debug mode is enabled (#495)
- [66031ba](https://github.com/bosun-ai/swiftide/commit/66031ba27b946add0533775423d468abb3187604) *(query)* Log query pipeline answer on debug (#497)
### Miscellaneous
- [d255772](https://github.com/bosun-ai/swiftide/commit/d255772cc933c839e3aaaffccd343acf75dcb251) *(agents)* Rename `CommandError::FailedWithOutput` to `CommandError::NonZeroExit` (#484)
````text
Better describes what is going on. I.e. `rg` exits with 1 if nothing is
found, tests generally do the same if they fail.
````
- [0000000](https://github.com/bosun-ai/swiftide/commit/0000000) Update Cargo.toml dependencies
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.14.4...0.15.0
## [0.14.4](https://github.com/bosun-ai/swiftide/compare/v0.14.3...v0.14.4) - 2024-12-11
### New features
- [7211559](https://github.com/bosun-ai/swiftide/commit/7211559936d8b5e16a3b42f9c90b42a39426be8a) *(agents)* **EXPERIMENTAL** Agents in Swiftide (#463)
````text
Agents are coming to Swiftide! We are still ironing out all the kinks,
while we make it ready for a proper release. You can already experiment
with agents, see the rustdocs for documentation, and an example in
`/examples`, and feel free to contact us via github or discord. Better
documentation, examples, and tutorials are coming soon.
Run completions in a loop, define tools with two handy macros, customize
the agent by hooking in on lifecycle events, and much more.
Besides documentation, expect a big release for what we build this for
soon! 🎉
````
- [3751f49](https://github.com/bosun-ai/swiftide/commit/3751f49201c71398144a8913a4443f452534def2) *(query)* Add support for single embedding retrieval with PGVector (#406)
### Miscellaneous
- [5ce4d21](https://github.com/bosun-ai/swiftide/commit/5ce4d21725ff9b0bb7f9da8fe026075fde9fc9a5) Clippy and deps fixes for 1.83 (#467)
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.14.3...0.14.4
## [0.14.3](https://github.com/bosun-ai/swiftide/compare/v0.14.2...v0.14.3) - 2024-11-20
### New features
- [1774b84](https://github.com/bosun-ai/swiftide/commit/1774b84f00a83fe69af4a2b6a6daf397d4d9b32d) *(integrations)* Add PGVector support for indexing ([#392](https://github.com/bosun-ai/swiftide/pull/392))
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.14.2...0.14.3
## [0.14.2](https://github.com/bosun-ai/swiftide/compare/v0.14.1...v0.14.2) - 2024-11-08
### Bug fixes
- [3924322](https://github.com/bosun-ai/swiftide/commit/39243224d739a76cf2b60204fc67819055b7bc6f) *(querying)* Query pipeline is now properly send and sync when possible ([#425](https://github.com/bosun-ai/swiftide/pull/425))
### Miscellaneous
- [52198f7](https://github.com/bosun-ai/swiftide/commit/52198f7fe76376a42c1fec8945bda4bf3e6971d4) Improve local dev build speed ([#434](https://github.com/bosun-ai/swiftide/pull/434))
````text
- **Tokio on rt-multi-thread only**
- **Remove manual checks from lancedb integration test**
- **Ensure all deps in workspace manifest**
- **Remove unused deps**
- **Remove examples and benchmarks from default members**
````
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.14.1...0.14.2
## [0.14.1](https://github.com/bosun-ai/swiftide/compare/v0.14.0...v0.14.1) - 2024-10-27
### Bug fixes
- [5bbcd55](https://github.com/bosun-ai/swiftide/commit/5bbcd55de65d73d7908e91c96f120928edb6b388) Revert 0.14 release as mistralrs is unpublished ([#417](https://github.com/bosun-ai/swiftide/pull/417))
````text
Revert the 0.14 release as `mistralrs` is unpublished and unfortunately
cannot be released.
````
### Miscellaneous
- [07c2661](https://github.com/bosun-ai/swiftide/commit/07c2661b7a7cdf75cdba12fab0ca91866793f727) Re-release 0.14 without mistralrs ([#419](https://github.com/bosun-ai/swiftide/pull/419))
````text
- **Revert "fix: Revert 0.14 release as mistralrs is unpublished
([#417](https://github.com/bosun-ai/swiftide/pull/417))"**
- **Fix changelog**
````
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.14.0...0.14.1
## [0.14.0](https://github.com/bosun-ai/swiftide/compare/v0.13.4...v0.14.0) - 2024-10-27
### Bug fixes
- [551a9cb](https://github.com/bosun-ai/swiftide/commit/551a9cb769293e42e15bae5dca3ab677be0ee8ea) *(indexing)* [**breaking**] Node ID no longer memoized ([#414](https://github.com/bosun-ai/swiftide/pull/414))
````text
As @shamb0 pointed out in [#392](https://github.com/bosun-ai/swiftide/pull/392), there is a potential issue where Node
ids are get cached before chunking or other transformations, breaking
upserts and potentially resulting in data loss.
````
**BREAKING CHANGE**: This PR reworks Nodes with a builder API and a private
id. Hence, manually creating nodes no longer works. In the future, all
the fields are likely to follow the same pattern, so that we can
decouple the inner fields from the Node's implementation.
- [c091ffa](https://github.com/bosun-ai/swiftide/commit/c091ffa6be792b0bd7bb03d604e26e40b2adfda8) *(indexing)* Use atomics for key generation in memory storage ([#415](https://github.com/bosun-ai/swiftide/pull/415))
### Miscellaneous
- [0000000](https://github.com/bosun-ai/swiftide/commit/0000000) Update Cargo.toml dependencies
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.13.4...0.14.0
## [0.13.4](https://github.com/bosun-ai/swiftide/compare/v0.13.3...v0.13.4) - 2024-10-21
### Bug fixes
- [47455fb](https://github.com/bosun-ai/swiftide/commit/47455fb04197a4b51142e2fb4c980e42ac54d11e) *(indexing)* Visibility of ChunkMarkdown builder should be public
- [2b3b401](https://github.com/bosun-ai/swiftide/commit/2b3b401dcddb2cb32214850b9b4dbb0481943d38) *(indexing)* Improve splitters consistency and provide defaults ([#403](https://github.com/bosun-ai/swiftide/pull/403))
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.13.3...0.13.4
# Changelog
All notable changes to this project will be documented in this file.
## [0.13.3](https://github.com/bosun-ai/swiftide/compare/v0.13.2...v0.13.3) - 2024-10-11
### Bug fixes
- [2647f16](https://github.com/bosun-ai/swiftide/commit/2647f16dc164eb5230d8f7c6d71e31663000cb0d) *(deps)* Update rust crate text-splitter to 0.17 ([#366](https://github.com/bosun-ai/swiftide/pull/366))
- [d74d85b](https://github.com/bosun-ai/swiftide/commit/d74d85be3bd98706349eff373c16443b9c45c4f0) *(indexing)* Add missing `Embed::batch_size` implementation ([#378](https://github.com/bosun-ai/swiftide/pull/378))
- [95f78d3](https://github.com/bosun-ai/swiftide/commit/95f78d3412951c099df33149c57817338a76553d) *(tree-sitter)* Compile regex only once ([#371](https://github.com/bosun-ai/swiftide/pull/371))
````text
Regex compilation is not cheap, use a static with a oncelock instead.
````
### Miscellaneous
- [0000000](https://github.com/bosun-ai/swiftide/commit/0000000) Update Cargo.toml dependencies
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.13.2...0.13.3
## [0.13.2](https://github.com/bosun-ai/swiftide/compare/v0.13.1...v0.13.2) - 2024-10-05
### New features
- [4b13aa7](https://github.com/bosun-ai/swiftide/commit/4b13aa7d76dfc7270870682e2f757f066a99ba4e) *(core)* Add support for cloning all trait objects ([#355](https://github.com/bosun-ai/swiftide/pull/355))
````text
For instance, if you have a `Box<dyn SimplePrompt>`, you can now clone
into an owned copy and more effectively use the available generics. This
also works for borrowed trait objects.
````
- [ed3da52](https://github.com/bosun-ai/swiftide/commit/ed3da52cf89b2384ec6f07c610c591b3eda2fa28) *(indexing)* Support Redb as embedable nodecache ([#346](https://github.com/bosun-ai/swiftide/pull/346))
````text
Adds support for Redb as an embeddable node cache, allowing full local
app development without needing external services.
````
### Bug fixes
- [06f8336](https://github.com/bosun-ai/swiftide/commit/06f83361c52010a451e8b775ce9c5d67057edbc5) *(indexing)* Ensure `name()` returns concrete name on trait objects ([#351](https://github.com/bosun-ai/swiftide/pull/351))
### Miscellaneous
- [8237c28](https://github.com/bosun-ai/swiftide/commit/8237c2890df681c48117188e80cbad914b91e0fd) *(core)* Mock traits for testing should not have their docs hidden
- [0000000](https://github.com/bosun-ai/swiftide/commit/0000000) Update Cargo.toml dependencies
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.13.1...0.13.2
## [0.13.1](https://github.com/bosun-ai/swiftide/compare/v0.13.0...v0.13.1) - 2024-10-02
### Bug fixes
- [e6d9ec2](https://github.com/bosun-ai/swiftide/commit/e6d9ec2fe034c9d36fd730c969555c459606d42f) *(lancedb)* Should not error if table exists ([#349](https://github.com/bosun-ai/swiftide/pull/349))
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.13.0...0.13.1
## [0.13.0](https://github.com/bosun-ai/swiftide/compare/v0.12.3...v0.13.0) - 2024-09-26
### New features
- [7d8a57f](https://github.com/bosun-ai/swiftide/commit/7d8a57f54b2c73267dfaa3b3a32079b11d9b32bc) *(indexing)* [**breaking**] Removed duplication of batch_size ([#336](https://github.com/bosun-ai/swiftide/pull/336))
**BREAKING CHANGE**: The batch size of batch transformers when indexing is
now configured on the batch transformer. If no batch size or default is
configured, a configurable default is used from the pipeline. The
default batch size is 256.
- [fd110c8](https://github.com/bosun-ai/swiftide/commit/fd110c8efeb3af538d4e51d033b6df02e90e05d9) *(tree-sitter)* Add support for Java 22 ([#309](https://github.com/bosun-ai/swiftide/pull/309))
### Bug fixes
- [23b96e0](https://github.com/bosun-ai/swiftide/commit/23b96e08b4e0f10f5faea0b193b404c9cd03f47f) *(tree-sitter)* [**breaking**] SupportedLanguages are now non-exhaustive ([#331](https://github.com/bosun-ai/swiftide/pull/331))
**BREAKING CHANGE**: SupportedLanguages are now non-exhaustive. This means that matching on SupportedLanguages will now require a catch-all arm.
This change was made to allow for future languages to be added without breaking changes.
### Miscellaneous
- [923a8f0](https://github.com/bosun-ai/swiftide/commit/923a8f0663e7d2b7138f54069f7a74c3cf6663ed) *(fastembed,qdrant)* Better batching defaults ([#334](https://github.com/bosun-ai/swiftide/pull/334))
```text
Qdrant and FastEmbed now have a default batch size, removing the need to set it manually. The default batch size is 50 and 256 respectively.
```
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.12.3...0.13.0
## [0.12.3](https://github.com/bosun-ai/swiftide/releases/tag/0.12.3) - 2024-09-23
### New features
- [da5df22](https://github.com/bosun-ai/swiftide/commit/da5df2230da81e9fe1e6ab74150511cbe1e3d769) *(tree-sitter)* Implement Serialize and Deserialize for SupportedLanguages ([#314](https://github.com/bosun-ai/swiftide/pull/314))
### Bug fixes
- [a756148](https://github.com/bosun-ai/swiftide/commit/a756148f85faa15b1a79db8ec8106f0e15e4d6a2) *(tree-sitter)* Fix javascript and improve tests ([#313](https://github.com/bosun-ai/swiftide/pull/313))
````text
As learned from [#309](https://github.com/bosun-ai/swiftide/pull/309), test coverage for the refs defs transformer was
not great. There _are_ more tests in code_tree. Turns out, with the
latest treesitter update, javascript broke as it was the only language
not covered at all.
````
### Miscellaneous
- [e8e9d80](https://github.com/bosun-ai/swiftide/commit/e8e9d80f2b4fbfe7ca2818dc542ca0a907a17da5) *(docs)* Add documentation to query module ([#276](https://github.com/bosun-ai/swiftide/pull/276))
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/0.12.2...0.12.3
## [v0.12.2](https://github.com/bosun-ai/swiftide/releases/tag/v0.12.2) - 2024-09-20
### Docs
- [d84814e](https://github.com/bosun-ai/swiftide/commit/d84814eef1bf12e485053fb69fb658d963100789) Fix broken documentation links and other cargo doc warnings (#304) by @tinco
````text
Running `cargo doc --all-features` resulted in a lot of warnings.
````
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/v0.12.1...v0.12.2
## [v0.12.1](https://github.com/bosun-ai/swiftide/releases/tag/v0.12.1) - 2024-09-16
### New features
- [ec227d2](https://github.com/bosun-ai/swiftide/commit/ec227d25b987b7fd63ab1b3862ef19b14632bd04) *(indexing,query)* Add concise info log with transformation name by @timonv
- [01cf579](https://github.com/bosun-ai/swiftide/commit/01cf579922a877bb78e0de20114ade501e5a63db) *(query)* Add query_mut for reusable query pipelines by @timonv
- [081a248](https://github.com/bosun-ai/swiftide/commit/081a248e67292c1800837315ec53583be5e0cb82) *(query)* Improve query performance similar to indexing in 0.12 by @timonv
- [8029926](https://github.com/bosun-ai/swiftide/commit/80299269054eb440e55a42667a7bcc9ba6514a7b) *(query,indexing)* Add duration in log output on pipeline completion by @timonv
### Bug fixes
- [39b6ecb](https://github.com/bosun-ai/swiftide/commit/39b6ecb6175e5233b129f94876f95182b8bfcdc3) *(core)* Truncate long strings safely when printing debug logs by @timonv
- [8b8ceb9](https://github.com/bosun-ai/swiftide/commit/8b8ceb9266827857859481c1fc4a0f0c40805e33) *(deps)* Update redis by @timonv
- [16e9c74](https://github.com/bosun-ai/swiftide/commit/16e9c7455829100b9ae82305e5a1d2568264af9f) *(openai)* Reduce debug verbosity by @timonv
- [6914d60](https://github.com/bosun-ai/swiftide/commit/6914d607717294467cddffa867c3d25038243fc1) *(qdrant)* Reduce debug verbosity when storing nodes by @timonv
- [3d13889](https://github.com/bosun-ai/swiftide/commit/3d1388973b5e2a135256ae288d47dbde0399487f) *(query)* Reduce and improve debugging verbosity by @timonv
- [133cf1d](https://github.com/bosun-ai/swiftide/commit/133cf1d0be09049ca3e90b45675a965bb2464cb2) *(query)* Remove verbose debug and skip self in instrumentation by @timonv
- [ce17981](https://github.com/bosun-ai/swiftide/commit/ce179819ab75460453236723c7f9a89fd61fb99a) Clippy by @timonv
- [a871c61](https://github.com/bosun-ai/swiftide/commit/a871c61ad52ed181d6f9cb6a66ed07bccaadee08) Fmt by @timonv
### Miscellaneous
- [d62b047](https://github.com/bosun-ai/swiftide/commit/d62b0478872e460956607f52b72470b76eb32d91) *(ci)* Update testcontainer images and fix tests by @timonv
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/v0.12.0...v0.12.1
## [v0.12.0](https://github.com/bosun-ai/swiftide/releases/tag/v0.12.0) - 2024-09-13
### New features
- [e902cb7](https://github.com/bosun-ai/swiftide/commit/e902cb7487221d3e88f13d88532da081e6ef8611) *(query)* Add support for filters in SimilaritySingleEmbedding (#298) by @timonv
````text
Adds support for filters for Qdrant and Lancedb in
SimilaritySingleEmbedding. Also fixes several small bugs and brings
improved tests.
````
- [f158960](https://github.com/bosun-ai/swiftide/commit/f1589604d1e0cb42a07d5a48080e3d7ecb90ee38) Major performance improvements (#291) by @timonv
````text
Futures that do not yield were not run in parallel properly. With this
futures are spawned on a tokio worker thread by default.
When embedding (fastembed) and storing a 85k row dataset, there's a
~1.35x performance improvement:
<img width="621" alt="image"
src="https://github.com/user-attachments/assets/ba2d4d96-8d4a-44f1-b02d-6ac2af0cedb7">
~~Need to do one more test with IO bound futures as well. Pretty huge,
not that it was slow.~~
With IO bound openai it's 1.5x.
````
### Bug fixes
- [f8314cc](https://github.com/bosun-ai/swiftide/commit/f8314ccdbe16ad7e6691899dd01f81a61b20180f) *(indexing)* Limit logged chunk to max 100 chars (#292) by @timonv
- [f95f806](https://github.com/bosun-ai/swiftide/commit/f95f806a0701b14a3cad5da307c27c01325a264d) *(indexing)* Debugging nodes should respect utf8 char boundaries by @timonv
- [8595553](https://github.com/bosun-ai/swiftide/commit/859555334d7e4129215b9f084d9f9840fac5ce36) Implement into_stream_boxed for all loaders by @timonv
- [9464ca1](https://github.com/bosun-ai/swiftide/commit/9464ca123f08d8dfba3f1bfabb57e9af97018534) Bad embed error propagation (#293) by @timonv
````text
- **fix(indexing): Limit logged chunk to max 100 chars**
- **fix: Embed transformers must correctly propagate errors**
````
### Miscellaneous
- [45d8a57](https://github.com/bosun-ai/swiftide/commit/45d8a57d1afb4f16ad76b15236308d753cf45743) *(ci)* Use llm-cov preview via nightly and improve test coverage (#289) by @timonv
````text
Fix test coverage in CI. Simplified the trait bounds on the query
pipeline for now to make it all work and fit together, and added more
tests to assert boxed versions of trait objects work in tests.
````
- [408f30a](https://github.com/bosun-ai/swiftide/commit/408f30ad8d007394ba971b314d399fcd378ffb61) *(deps)* Update testcontainers (#295) by @timonv
- [37c4bd9](https://github.com/bosun-ai/swiftide/commit/37c4bd9f9ac97646adb2c4b99b8f7bf0bee4c794) *(deps)* Update treesitter (#296) by @timonv
- [8d9e954](https://github.com/bosun-ai/swiftide/commit/8d9e9548ccc1b39e302ee42dd5058f50df13270f) Cargo update by @timonv
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/v0.11.1...v0.12.0
## [v0.11.1](https://github.com/bosun-ai/swiftide/releases/tag/v0.11.1) - 2024-09-10
### New features
- [3c9491b](https://github.com/bosun-ai/swiftide/commit/3c9491b8e1ce31a030eaac53f56890629a087f70) Implemtent traits T for Box<T> for indexing and query traits (#285) by @timonv
````text
When working with trait objects, some pipeline steps now allow for
Box<dyn Trait> as well.
````
### Bug fixes
- [dfa546b](https://github.com/bosun-ai/swiftide/commit/dfa546b310e71a7cb78a927cc8f0ee4e2046a592) Add missing parquet feature flag by @timonv
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/v0.11.0...v0.11.1
## [v0.11.0](https://github.com/bosun-ai/swiftide/releases/tag/v0.11.0) - 2024-09-08
### New features
- [bdf17ad](https://github.com/bosun-ai/swiftide/commit/bdf17adf5d3addc84aaf45ad893b816cb46431e3) *(indexing)* Parquet loader (#279) by @timonv
````text
Ingest and index data from parquet files.
````
- [a98dbcb](https://github.com/bosun-ai/swiftide/commit/a98dbcb455d33f0537cea4d3614da95f1a4b6554) *(integrations)* Add ollama embeddings support (#278) by @ephraimkunz
````text
Update to the most recent ollama-rs, which exposes the batch embedding
API Ollama exposes (https://github.com/pepperoni21/ollama-rs/pull/61).
This allows the Ollama struct in Swiftide to implement `EmbeddingModel`.
Use the same pattern that the OpenAI struct uses to manage separate
embedding and prompt models.
---------
````
### Miscellaneous
- [873795b](https://github.com/bosun-ai/swiftide/commit/873795b31b3facb0cf5efa724cb391f7bf387fb0) *(ci)* Re-enable coverage via Coverals with tarpaulin (#280) by @timonv
- [465de7f](https://github.com/bosun-ai/swiftide/commit/465de7fc952d66f4cd15002ef39aab0e7ec3ac26) Update CHANGELOG.md with breaking change by @timonv
### New Contributors
* @ephraimkunz made their first contribution in [#278](https://github.com/bosun-ai/swiftide/pull/278)
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/v0.10.0...v0.11.0
## [v0.10.0](https://github.com/bosun-ai/swiftide/releases/tag/v0.10.0) - 2024-09-06
### Bug fixes
- [5a724df](https://github.com/bosun-ai/swiftide/commit/5a724df895d35cfa606721d611afd073a23191de) [**breaking**] Rust 1.81 support (#275) by @timonv
````text
Fixing id generation properly as per #272, will be merged in together.
- **Clippy**
- **fix(qdrant)!: Default hasher changed in Rust 1.81**
````
**BREAKING CHANGE**: Rust 1.81 support (#275)
### Docs
- [3711f6f](https://github.com/bosun-ai/swiftide/commit/3711f6fb2b51e97e4606b744cc963c04b44b6963) *(readme)* Fix date (#273) by @dzvon
````text
I suppose this should be 09-02.
````
### New Contributors
* @dzvon made their first contribution in [#273](https://github.com/bosun-ai/swiftide/pull/273)
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/v0.9.2...v0.10.0
## [v0.9.2](https://github.com/bosun-ai/swiftide/releases/tag/v0.9.2) - 2024-09-04
### New features
- [84e9bae](https://github.com/bosun-ai/swiftide/commit/84e9baefb366f0a949ae7dcbdd8f97931da0b4be) *(indexing)* Add chunker for text with text_splitter (#270) by @timonv
- [387fbf2](https://github.com/bosun-ai/swiftide/commit/387fbf29c2bce06284548f9af146bb3969562761) *(query)* Hybrid search for qdrant in query pipeline (#260) by @timonv
````text
Implement hybrid search for qdrant with their new Fusion search. Example
in /examples includes an indexing and query pipeline, included the
example answer as well.
````
### Docs
- [064c7e1](https://github.com/bosun-ai/swiftide/commit/064c7e157775a7aaf9628a39f941be35ce0be99a) *(readme)* Update intro by @timonv
- [1dc4c90](https://github.com/bosun-ai/swiftide/commit/1dc4c90436c9c8c8d0eb080e300afce53090c73e) *(readme)* Add new blog links by @timonv
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/v0.9.1...v0.9.2
## [v0.9.1](https://github.com/bosun-ai/swiftide/releases/tag/v0.9.1) - 2024-09-01
### New features
- [b891f93](https://github.com/bosun-ai/swiftide/commit/b891f932e43b9c76198d238bcde73a6bb1dfbfdb) *(integrations)* Add fluvio as loader support (#243) by @timonv
````text
Adds Fluvio as a loader support, enabling Swiftide indexing streams to
process messages from a Fluvio topic.
````
- [c00b6c8](https://github.com/bosun-ai/swiftide/commit/c00b6c8f08fca46451387f3034d3d53805f3e401) *(query)* Ragas support (#236) by @timonv
````text
Work in progress on support for ragas as per
https://github.com/explodinggradients/ragas/issues/1165 and #232
Add an optional evaluator to a pipeline. Evaluators need to handle
transformation events in the query pipeline. The Ragas evaluator
captures the transformations as per
https://docs.ragas.io/en/latest/howtos/applications/data_preparation.html.
You can find a working notebook here
https://github.com/bosun-ai/swiftide-tutorial/blob/c510788a625215f46575415161659edf26fc1fd5/ragas/notebook.ipynb
with a pipeline using it here
https://github.com/bosun-ai/swiftide-tutorial/pull/1
````
- [a1250c1](https://github.com/bosun-ai/swiftide/commit/a1250c1cef57e2b74760fd31772e106993a3b079) LanceDB support (#254) by @timonv
````text
Add LanceDB support for indexing and querying. LanceDB separates compute
from storage, where storage can be local or hosted elsewhere.
````
### Bug fixes
- [f92376d](https://github.com/bosun-ai/swiftide/commit/f92376d551a3bf4fe39d81a64c4328a742677669) *(deps)* Update rust crate aws-sdk-bedrockruntime to v1.46.0 (#247) by @renovate[bot]
- [732a166](https://github.com/bosun-ai/swiftide/commit/732a166f388d4aefaeec694103e3d1ff57655d69) Remove no default features from futures-util by @timonv
### Miscellaneous
- [9b257da](https://github.com/bosun-ai/swiftide/commit/9b257dadea6c07f720ac4ea447342b2f6d91d0ec) Default features cleanup (#262) by @timonv
````text
Integrations are messy and pull a lot in. A potential solution is to
disable default features, only add what is actually required, and put
the responsibility at users if they need anything specific. Feature
unification should then take care of the rest.
````
### Docs
- [fb381b8](https://github.com/bosun-ai/swiftide/commit/fb381b8896a5fc863a4185445ce51fefb99e6c11) *(readme)* Copy improvements (#261) by @timonv
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/v0.9.0...v0.9.1
## [v0.9.0](https://github.com/bosun-ai/swiftide/releases/tag/v0.9.0) - 2024-08-15
### New features
- [2443933](https://github.com/bosun-ai/swiftide/commit/24439339a9b935befcbcc92e56c01c5048605138) *(qdrant)* Add access to inner client for custom operations (#242) by @timonv
- [4fff613](https://github.com/bosun-ai/swiftide/commit/4fff613b461e8df993327cb364cabc65cd5901d8) *(query)* Add concurrency on query pipeline and add query_all by @timonv
### Bug fixes
- [4e31c0a](https://github.com/bosun-ai/swiftide/commit/4e31c0a6cdc6b33e4055f611dc48d3aebf7514ae) *(deps)* Update rust crate aws-sdk-bedrockruntime to v1.44.0 (#244) by @renovate[bot]
- [501321f](https://github.com/bosun-ai/swiftide/commit/501321f811a0eec8d1b367f7c7f33b1dfd29d2b6) *(deps)* Update rust crate spider to v1.99.37 (#230) by @renovate[bot]
- [8a1cc69](https://github.com/bosun-ai/swiftide/commit/8a1cc69712b4361893c0564c7d6f7d1ed21e5710) *(query)* After retrieval current transormation should be empty by @timonv
### Miscellaneous
- [e9d0016](https://github.com/bosun-ai/swiftide/commit/e9d00160148807a8e2d1df1582e6ea85cfd2d8d0) *(indexing,integrations)* Move tree-sitter dependencies to integrations (#235) by @timonv
````text
Removes the dependency of indexing on integrations, resulting in much
faster builds when developing on indexing.
````
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/v0.8.0...v0.9.0
## [v0.8.0](https://github.com/bosun-ai/swiftide/releases/tag/v0.8.0) - 2024-08-12
### New features
- [2e25ad4](https://github.com/bosun-ai/swiftide/commit/2e25ad4b999a8562a472e086a91020ec4f8300d8) *(indexing)* [**breaking**] Default LLM for indexing pipeline and boilerplate Transformer macro (#227) by @timonv
````text
Add setting a default LLM for an indexing pipeline, avoiding the need to
clone multiple times.
More importantly, introduced `swiftide-macros` with
`#[swiftide_macros::indexing_transformer]` that generates
all boilerplate code used for internal transformers. This ensures all
transformers are consistent and makes them
easy to change in the future. This is a big win for maintainability and
ease to extend. Users are encouraged to use the macro
as well.
````
**BREAKING CHANGE**: Introduces `WithIndexingDefaults` and
`WithBatchIndexingDefaults` trait constraints for transformers. They can
be used as a marker
with a noop (i.e. just `impl WithIndexingDefaults for MyTransformer
{}`). However, when implemented fully, they can be used to provide
defaults from the pipeline to your transformers.
- [67336f1](https://github.com/bosun-ai/swiftide/commit/67336f1d9c7fde474bdddfd0054b40656df244e0) *(indexing)* Sparse vector support with Splade and Qdrant (#222) by @timonv
````text
Adds Sparse vector support to the indexing pipeline, enabling hybrid
search for vector databases. The design should work for any form of
Sparse embedding, and works with existing embedding modes and multiple
named vectors. Additionally, added `try_default_sparse` to FastEmbed,
using Splade, so it's fully usuable.
Hybrid search in the query pipeline coming soon.
````
- [e728a7c](https://github.com/bosun-ai/swiftide/commit/e728a7c7a2fcf7b22c31e5d6c66a896f634f6901) Code outlines in chunk metadata (#137) by @tinco
````text
Added a transformer that generates outlines for code files using tree sitter. And another that compresses the outline to be more relevant to chunks. Additionally added a step to the metadata QA tool that uses the outline to improve the contextual awareness during QA generation.
````
### Bug fixes
- [dc7412b](https://github.com/bosun-ai/swiftide/commit/dc7412beda4377e8a6222b3ad576f0a1af332533) *(deps)* Update aws-sdk-rust monorepo (#223) by @renovate[bot]
### Miscellaneous
- [9613f50](https://github.com/bosun-ai/swiftide/commit/9613f50c0036b42411cd3a3014f54b592fe4958a) *(ci)* Only show remote github url if present in changelog by @timonv
### Docs
- [73d1649](https://github.com/bosun-ai/swiftide/commit/73d1649ca8427aa69170f6451eac55316581ed9a) *(readme)* Add Ollama support to README by @timonv
- [b3f04de](https://github.com/bosun-ai/swiftide/commit/b3f04defe94e5b26876c8d99049f4d87b5f2dc18) *(readme)* Add link to discord (#219) by @timonv
- [4970a68](https://github.com/bosun-ai/swiftide/commit/4970a683acccc71503e64044dc02addaf2e9c87c) *(readme)* Fix discord links by @timonv
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/v0.7.1...v0.8.0
## [v0.7.1](https://github.com/bosun-ai/swiftide/releases/tag/v0.7.1) - 2024-08-04
### New features
- [b2d31e5](https://github.com/bosun-ai/swiftide/commit/b2d31e555cb8da525513490e7603df1f6b2bfa5b) *(integrations)* Add ollama support (#214) by @tinco
- [9eb5894](https://github.com/bosun-ai/swiftide/commit/9eb589416c2a56f9942b6f6bed3771cec6acebaf) *(query)* Add support for closures in all steps (#215) by @timonv
### Miscellaneous
- [53e662b](https://github.com/bosun-ai/swiftide/commit/53e662b8c30f6ac6d11863685d3850ab48397766) *(ci)* Add cargo deny to lint dependencies (#213) by @timonv
### Docs
- [1539393](https://github.com/bosun-ai/swiftide/commit/15393932dd756af134a12f7954faa75893f8c3fb) *(readme)* Update README.md by @timonv
- [ba07ab9](https://github.com/bosun-ai/swiftide/commit/ba07ab93722d974ac93ed5d4a22bf53317bc11ae) *(readme)* Readme improvements by @timonv
- [f7accde](https://github.com/bosun-ai/swiftide/commit/f7accdeecf01efc291503282554257846725ce57) *(readme)* Add 0.7 announcement by @timonv
- [084548f](https://github.com/bosun-ai/swiftide/commit/084548f0fbfbb8cf6d359585f30c8e2593565681) *(readme)* Clarify on closures by @timonv
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/swiftide-v0.7.0...v0.7.1
## [swiftide-v0.7.0](https://github.com/bosun-ai/swiftide/releases/tag/swiftide-v0.7.0) - 2024-07-28
### New features
- [ec1fb04](https://github.com/bosun-ai/swiftide/commit/ec1fb04573ab75fe140cbeff17bc3179e316ff0c) *(indexing)* Metadata as first class citizen (#204) by @timonv
````text
Adds our own implementation for metadata, internally still using a
BTreeMap. The Value type is now a `serde_json::Value` enum. This allows
us to store the metadata in the same format as the rest of the document,
and also allows us to use values programmatically later.
As is, all current meta data is still stored as Strings.
````
- [16bafe4](https://github.com/bosun-ai/swiftide/commit/16bafe4da8c98adcf90f5bb63070832201c405b9) *(swiftide)* [**breaking**] Rework workspace preparing for swiftide-query (#199) by @timonv
````text
Splits up the project into multiple small, unpublished crates. Boosts
compile times, makes the code a bit easier to grok and enables
swiftide-query to be build separately.
````
**BREAKING CHANGE**: All indexing related tools are now in
- [63694d2](https://github.com/bosun-ai/swiftide/commit/63694d2892a7c97a7e7fc42664d550c5acd7bb12) *(swiftide-query)* Query pipeline v1 (#189) by @timonv
### Bug fixes
- [ee3aad3](https://github.com/bosun-ai/swiftide/commit/ee3aad37a40eb9f18c9a3082ad6826ff4b6c7245) *(deps)* Update rust crate aws-sdk-bedrockruntime to v1.42.0 (#195) by @renovate[bot]
- [be0f31d](https://github.com/bosun-ai/swiftide/commit/be0f31de4f0c7842e23628fd6144cc4406c165c0) *(deps)* Update rust crate spider to v1.99.11 (#190) by @renovate[bot]
- [dd04453](https://github.com/bosun-ai/swiftide/commit/dd04453ecb8d04326929780e9e52155b37d731e2) *(swiftide)* Update main lockfile by @timonv
- [bafd907](https://github.com/bosun-ai/swiftide/commit/bafd90706346c3e208390f1296f10e2c17ad61b1) Update all cargo package descriptions by @timonv
### Miscellaneous
- [e72641b](https://github.com/bosun-ai/swiftide/commit/e72641b677cfd1b21e98fd74552728dbe3e7a9bc) *(ci)* Set versions in dependencies by @timonv
### Docs
- [2114aa4](https://github.com/bosun-ai/swiftide/commit/2114aa4394f4eda2e6465e1adb5602ae1b3ff61f) *(readme)* Add copy on the query pipeline by @timonv
- [573aff6](https://github.com/bosun-ai/swiftide/commit/573aff6fee3f891bae61e92e131dd15425cefc29) *(indexing)* Document the default prompt templates and their context (#206) by @timonv
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/swiftide-v0.6.7...swiftide-v0.7.0
## [swiftide-v0.6.7](https://github.com/bosun-ai/swiftide/releases/tag/swiftide-v0.6.7) - 2024-07-23
### New features
- [beea449](https://github.com/bosun-ai/swiftide/commit/beea449301b89fde1915c5336a071760c1963c75) *(prompt)* Add Into for strings to PromptTemplate (#193) by @timonv
- [f3091f7](https://github.com/bosun-ai/swiftide/commit/f3091f72c74e816f6b9b8aefab058d610becb625) *(transformers)* References and definitions from code (#186) by @timonv
### Docs
- [97a572e](https://github.com/bosun-ai/swiftide/commit/97a572ec2e3728bbac82c889bf5129b048e61e0c) *(readme)* Add blog posts and update doc link (#194) by @timonv
- [504fe26](https://github.com/bosun-ai/swiftide/commit/504fe2632cf4add506dfb189c17d6e4ecf6f3824) *(pipeline)* Add note that closures can also be used as transformers by @timonv
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/swiftide-v0.6.6...swiftide-v0.6.7
## [swiftide-v0.6.6](https://github.com/bosun-ai/swiftide/releases/tag/swiftide-v0.6.6) - 2024-07-16
### New features
- [d1c642a](https://github.com/bosun-ai/swiftide/commit/d1c642aa4ee9b373e395a78591dd36fa0379a4ff) *(groq)* Add SimplePrompt support for Groq (#183) by @timonv
````text
Adds simple prompt support for Groq by using async_openai. ~~Needs some
double checks~~. Works great.
````
### Bug fixes
- [5d4a814](https://github.com/bosun-ai/swiftide/commit/5d4a8145b6952b2f4f9a1f144913673eeb3aaf24) *(deps)* Update rust crate aws-sdk-bedrockruntime to v1.40.0 (#169) by @renovate[bot]
### Docs
- [143c7c9](https://github.com/bosun-ai/swiftide/commit/143c7c9c2638737166f23f2ef8106b7675f6e19b) *(readme)* Fix typo (#180) by @eltociear
- [d393181](https://github.com/bosun-ai/swiftide/commit/d3931818146bff72499ebfcc0d0e8c8bb13a760d) *(docsrs)* Scrape examples and fix links (#184) by @timonv
### New Contributors
* @eltociear made their first contribution in [#180](https://github.com/bosun-ai/swiftide/pull/180)
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/swiftide-v0.6.5...swiftide-v0.6.6
## [swiftide-v0.6.5](https://github.com/bosun-ai/swiftide/releases/tag/swiftide-v0.6.5) - 2024-07-15
### New features
- [0065c7a](https://github.com/bosun-ai/swiftide/commit/0065c7a7fd1289ea227391dd7b9bd51c905290d5) *(prompt)* Add extending the prompt repository (#178) by @timonv
### Bug fixes
- [b54691f](https://github.com/bosun-ai/swiftide/commit/b54691f769e2d0ac7886938b6e837551926eea2f) *(prompts)* Include default prompts in crate (#174) by @timonv
````text
- **add prompts to crate**
- **load prompts via cargo manifest dir**
````
- [3c297bb](https://github.com/bosun-ai/swiftide/commit/3c297bbb85fd3ae9b411a691024f622702da3617) *(swiftide)* Remove include from Cargo.toml by @timonv
### Miscellaneous
- [73d5fa3](https://github.com/bosun-ai/swiftide/commit/73d5fa37d23f53919769c2ffe45db2e3832270ef) *(traits)* Cleanup unused batch size in `BatchableTransformer` (#177) by @timonv
### Docs
- [b95b395](https://github.com/bosun-ai/swiftide/commit/b95b3955f89ed231cc156dab749ee7bb8be98ee5) *(swiftide)* Documentation improvements and cleanup (#176) by @timonv
````text
- **chore: remove ingestion stream**
- **Documentation and grammar**
````
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/swiftide-v0.6.3...swiftide-v0.6.5
## [swiftide-v0.6.3](https://github.com/bosun-ai/swiftide/releases/tag/swiftide-v0.6.3) - 2024-07-14
### Bug fixes
- [47418b5](https://github.com/bosun-ai/swiftide/commit/47418b5d729aef1e2ff77dabd7e29b5131512b01) *(prompts)* Fix breaking issue with prompts not found by @timonv
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/swiftide-v0.6.2...swiftide-v0.6.3
## [swiftide-v0.6.2](https://github.com/bosun-ai/swiftide/releases/tag/swiftide-v0.6.2) - 2024-07-12
### Miscellaneous
- [2b682b2](https://github.com/bosun-ai/swiftide/commit/2b682b28fd146fac2c61f1ee430534a04b9fa7ce) *(deps)* Limit feature flags on qdrant to fix docsrs by @timonv
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/swiftide-v0.6.1...swiftide-v0.6.2
## [swiftide-v0.6.1](https://github.com/bosun-ai/swiftide/releases/tag/swiftide-v0.6.1) - 2024-07-12
### Miscellaneous
- [aae7ab1](https://github.com/bosun-ai/swiftide/commit/aae7ab18f8c9509fd19f83695e4eca942c377043) *(deps)* Patch update all by @timonv
### Docs
- [085709f](https://github.com/bosun-ai/swiftide/commit/085709fd767bab7153b2222907fc500ad4412570) *(docsrs)* Disable unstable and rustdoc scraping by @timonv
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/swiftide-v0.6.0...swiftide-v0.6.1
## [swiftide-v0.6.0](https://github.com/bosun-ai/swiftide/releases/tag/swiftide-v0.6.0) - 2024-07-12
### New features
- [70ea268](https://github.com/bosun-ai/swiftide/commit/70ea268b19e564af83bb834f56d406a05e02e9cd) *(prompts)* Add prompts as first class citizens (#145) by @timonv
````text
Adds Prompts as first class citizens. This is a breaking change as
SimplePrompt with just a a `&str` is no longer allowed.
This introduces `Prompt` and `PromptTemplate`. A template uses jinja
style templating build on tera. Templates can be converted into prompts,
and have context added. A prompt is then send to something that prompts,
i.e. openai or bedrock.
Additional prompts can be added either compiled or as one-offs.
Additionally, it's perfectly fine to prompt with just a string as well,
just provide an `.into()`.
For future development, some LLMs really benefit from system prompts,
which this would enable. For the query pipeline we can also take a much
more structured approach with composed templates and conditionals.
````
- [699cfe4](https://github.com/bosun-ai/swiftide/commit/699cfe44fb0e3baddba695ad09836caec7cb30a6) Embed modes and named vectors (#123) by @pwalski
````text
Added named vector support to qdrant. A pipeline can now have its embed
mode configured, either per field, chunk and metadata combined (default)
or both. Vectors need to be configured on the qdrant client side.
See `examples/store_multiple_vectors.rs` for an example.
Shoutout to @pwalski for the contribution. Closes #62.
---------
````
### Bug fixes
- [9334934](https://github.com/bosun-ai/swiftide/commit/9334934e4af92b35dbc61e1f92aa90abac29ca12) *(chunkcode)* Use correct chunksizes (#122) by @timonv
- [dfc76dd](https://github.com/bosun-ai/swiftide/commit/dfc76ddfc23d9314fe88c8362bf53d7865a03302) *(deps)* Update rust crate serde to v1.0.204 (#129) by @renovate[bot]
- [28f5b04](https://github.com/bosun-ai/swiftide/commit/28f5b048f5acd977915ae20463f8fbb473dfab9a) *(deps)* Update rust crate tree-sitter-typescript to v0.21.2 (#128) by @renovate[bot]
- [9c261b8](https://github.com/bosun-ai/swiftide/commit/9c261b87dde2e0caaff0e496d15681466844daf4) *(deps)* Update rust crate text-splitter to v0.14.1 (#127) by @renovate[bot]
- [ff92abd](https://github.com/bosun-ai/swiftide/commit/ff92abd95908365c72d96abff37e0284df8fed32) *(deps)* Update rust crate tree-sitter-javascript to v0.21.4 (#126) by @renovate[bot]
- [7af97b5](https://github.com/bosun-ai/swiftide/commit/7af97b589ca45f2b966ea2f61ebef341c881f1f9) *(deps)* Update rust crate spider to v1.98.7 (#124) by @renovate[bot]
- [adc4bf7](https://github.com/bosun-ai/swiftide/commit/adc4bf789f679079fcc9fac38f4a7b8f98816844) *(deps)* Update aws-sdk-rust monorepo (#125) by @renovate[bot]
- [dd32ef3](https://github.com/bosun-ai/swiftide/commit/dd32ef3b1be7cd6888d2961053d0b3c1a882e1a4) *(deps)* Update rust crate async-trait to v0.1.81 (#134) by @renovate[bot]
- [2b13523](https://github.com/bosun-ai/swiftide/commit/2b1352322e574b62cb30268b35c6b510122f0584) *(deps)* Update rust crate fastembed to v3.7.1 (#135) by @renovate[bot]
- [8e22937](https://github.com/bosun-ai/swiftide/commit/8e22937427b928524dacf2b446feeff726b6a5e1) *(deps)* Update rust crate aws-sdk-bedrockruntime to v1.39.0 (#143) by @renovate[bot]
- [353cd9e](https://github.com/bosun-ai/swiftide/commit/353cd9ed36fcf6fb8f1db255d8b5f4a914ca8496) *(qdrant)* Upgrade and better defaults (#118) by @timonv
````text
- **fix(deps): update rust crate qdrant-client to v1.10.1**
- **fix(qdrant): upgrade to new qdrant with sensible defaults**
- **feat(qdrant): safe to clone with internal arc**
---------
````
- [b53636c](https://github.com/bosun-ai/swiftide/commit/b53636cbd8f179f248cc6672aaf658863982c603) Inability to store only some of `EmbeddedField`s (#139) by @pwalski
### Performance
- [ea8f823](https://github.com/bosun-ai/swiftide/commit/ea8f8236cdd9c588e55ef78f9eac27db1f13b2d9) Improve local build performance and crate cleanup (#148) by @timonv
````text
- **tune cargo for faster builds**
- **perf(swiftide): increase local build performance**
````
### Miscellaneous
- [eb8364e](https://github.com/bosun-ai/swiftide/commit/eb8364e08a9202476cca6b60fbdfbb31fe0e1c3d) *(ci)* Try overriding the github repo for git cliff by @timonv
- [5de6af4](https://github.com/bosun-ai/swiftide/commit/5de6af42b9a1e95b0fbd54659c0d590db1d76222) *(ci)* Only add contributors if present by @timonv
- [4c9ed77](https://github.com/bosun-ai/swiftide/commit/4c9ed77c85b7dd0e8722388b930d169cd2e5a5c7) *(ci)* Properly check if contributors are present by @timonv
- [c5bf796](https://github.com/bosun-ai/swiftide/commit/c5bf7960ca6bec498cdc987fe7676acfef702e5b) *(ci)* Add clippy back to ci (#147) by @timonv
- [7a8843a](https://github.com/bosun-ai/swiftide/commit/7a8843ab9e64b623870ebe49079ec976aae56d5c) *(deps)* Update rust crate testcontainers to 0.20.0 (#133) by @renovate[bot]
- [364e13d](https://github.com/bosun-ai/swiftide/commit/364e13d83285317a1fb99889f6d74ad32b58c482) *(swiftide)* Loosen up dependencies (#140) by @timonv
````text
Loosen up dependencies so swiftide is a bit more flexible to add to
existing projects
````
- [84dd65d](https://github.com/bosun-ai/swiftide/commit/84dd65dc6c0ff4595f27ed061a4f4c0a2dae7202) [**breaking**] Rename all mentions of ingest to index (#130) by @timonv
````text
Swiftide is not an ingestion pipeline (loading data), but an indexing
pipeline (prepping for search).
There is now a temporary, deprecated re-export to match the previous api.
````
**BREAKING CHANGE**: rename all mentions of ingest to index (#130)
- [51c114c](https://github.com/bosun-ai/swiftide/commit/51c114ceb06db840c4952d3d0f694bfbf266681c) Various tooling & community improvements (#131) by @timonv
````text
- **fix(ci): ensure clippy runs with all features**
- **chore(ci): coverage using llvm-cov**
- **chore: drastically improve changelog generation**
- **chore(ci): add sanity checks for pull requests**
- **chore(ci): split jobs and add typos**
````
- [d2a9ea1](https://github.com/bosun-ai/swiftide/commit/d2a9ea1e7afa6f192bf9c32bbb54d9bb6e46472e) Enable clippy pedantic (#132) by @timonv
### Docs
- [8405c9e](https://github.com/bosun-ai/swiftide/commit/8405c9efedef944156c2904eb709ba79aa4d82de) *(contributing)* Add guidelines on code design (#113) by @timonv
- [3e447fe](https://github.com/bosun-ai/swiftide/commit/3e447feab83a4bf8d7d9d8220fe1b92dede9af79) *(readme)* Link to CONTRIBUTING (#114) by @timonv
- [4c40e27](https://github.com/bosun-ai/swiftide/commit/4c40e27e5c6735305c70696ddf71dd5f95d03bbb) *(readme)* Add back coverage badge by @timonv
- [5691ac9](https://github.com/bosun-ai/swiftide/commit/5691ac930fd6547c3f0166b64ead0ae647c38883) *(readme)* Add preproduction warning by @timonv
- [37af322](https://github.com/bosun-ai/swiftide/commit/37af3225b4c3464aa4ed67f8f456c26f3d445507) *(rustdocs)* Rewrite the initial landing page (#149) by @timonv
````text
- **Add homepage and badges to cargo toml**
- **documentation landing page improvements**
````
- [7686c2d](https://github.com/bosun-ai/swiftide/commit/7686c2d449b5df0fddc08b111174357d47459f86) Templated prompts are now a major feature by @timonv
### New Contributors
* @pwalski made their first contribution in [#139](https://github.com/bosun-ai/swiftide/pull/139)
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/swiftide-v0.5.0...swiftide-v0.6.0
## [swiftide-v0.5.0](https://github.com/bosun-ai/swiftide/releases/tag/swiftide-v0.5.0) - 2024-07-01
### New features
- [6a88651](https://github.com/bosun-ai/swiftide/commit/6a88651df8c6b91add03acfc071fb9479545b8af) *(ingestion_pipeline)* Implement filter (#109) by @timonv
- [5aeb3a7](https://github.com/bosun-ai/swiftide/commit/5aeb3a7fb75b21b2f24b111e9640ea4985b2e316) *(ingestion_pipeline)* Splitting and merging streams by @timonv
- [8812fbf](https://github.com/bosun-ai/swiftide/commit/8812fbf30b882b68bf25f3d56b3ddf17af0bcb7a) *(ingestion_pipeline)* Build a pipeline from a stream by @timonv
- [6101bed](https://github.com/bosun-ai/swiftide/commit/6101bed812c5167eb87a4093d66005140517598d) AWS bedrock support (#92) by @timonv
````text
Adds an integration with AWS Bedrock, implementing SimplePrompt for
Anthropic and Titan models. More can be added if there is a need. Same
for the embedding models.
````
### Bug fixes
- [17a2be1](https://github.com/bosun-ai/swiftide/commit/17a2be1de6c0f3bda137501db4b1703f9ed0b1c5) *(changelog)* Add scope by @timonv
- [a12cce2](https://github.com/bosun-ai/swiftide/commit/a12cce230032eebe2f7ff1aa9cdc85b8fc200eb1) *(openai)* Add tests for builder by @timonv
- [963919b](https://github.com/bosun-ai/swiftide/commit/963919b0947faeb7d96931c19e524453ad4a0007) *(transformers)* [**breaking**] Fix too small chunks being retained and api by @timonv
**BREAKING CHANGE**: Fix too small chunks being retained and api
- [5e8da00](https://github.com/bosun-ai/swiftide/commit/5e8da008ce08a23377672a046a4cedd48d4cf30c) Fix oversight in ingestion pipeline tests by @timonv
- [e8198d8](https://github.com/bosun-ai/swiftide/commit/e8198d81354bbca2c21ca08b9522d02b8c93173b) Use git cliff manually for changelog generation by @timonv
- [2c31513](https://github.com/bosun-ai/swiftide/commit/2c31513a0ded87addd0519bbfdd63b5abed29f73) Just use keepachangelog by @timonv
- [6430af7](https://github.com/bosun-ai/swiftide/commit/6430af7b57eecb7fdb954cd89ade4547b8e92dbd) Use native cargo bench format and only run benchmarks crate by @timonv
- [cba981a](https://github.com/bosun-ai/swiftide/commit/cba981a317a80173eff2946fc551d1a36ec40f65) Replace unwrap with expect and add comment on panic by @timonv
### Miscellaneous
- [e243212](https://github.com/bosun-ai/swiftide/commit/e2432123f0dfc48147ebed13fe6e3efec3ff7b3f) *(ci)* Enable continous benchmarking and improve benchmarks (#98) by @timonv
- [2dbf14c](https://github.com/bosun-ai/swiftide/commit/2dbf14c34bed2ee40ab79c0a46d011cd20882bda) *(ci)* Fix benchmarks in ci by @timonv
- [b155de6](https://github.com/bosun-ai/swiftide/commit/b155de6387ddfe64d1a177b31c8e1ed93739b2c9) *(ci)* Fix naming of github actions by @timonv
- [206e432](https://github.com/bosun-ai/swiftide/commit/206e432dd291dd6a4592a6fb5f890049595311cb) *(ci)* Add support for merge queues by @timonv
- [46752db](https://github.com/bosun-ai/swiftide/commit/46752dbfc8ccd578ddba915fd6cd6509e3e6fb14) *(ci)* Add concurrency configuration by @timonv
- [5f09c11](https://github.com/bosun-ai/swiftide/commit/5f09c116f418cecb96fb1e86161333908d1a4d70) Add initial benchmarks by @timonv
- [162c6ef](https://github.com/bosun-ai/swiftide/commit/162c6ef2a07e40b8607b0ab6773909521f0bb798) Ensure feat is always in Added by @timonv
### Docs
- [929410c](https://github.com/bosun-ai/swiftide/commit/929410cb1c2d81b6ffaec4c948c891472835429d) *(readme)* Add diagram to the readme (#107) by @timonv
- [b014f43](https://github.com/bosun-ai/swiftide/commit/b014f43aa187881160245b4356f95afe2c6fe98c) Improve documentation across the project (#112) by @timonv
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/swiftide-v0.4.3...swiftide-v0.5.0
## [swiftide-v0.4.3](https://github.com/bosun-ai/swiftide/releases/tag/swiftide-v0.4.3) - 2024-06-28
### Bug fixes
- [ab3dc86](https://github.com/bosun-ai/swiftide/commit/ab3dc861490a0d1ab94f96e741e09c860094ebc0) *(memory_storage)* Fallback to incremental counter when missing id by @timonv
### Miscellaneous
- [bdebc24](https://github.com/bosun-ai/swiftide/commit/bdebc241507e9f55998e96ca4aece530363716af) Clippy by @timonv
### Docs
- [dad3e02](https://github.com/bosun-ai/swiftide/commit/dad3e02fdc8a57e9de16832090c44c536e7e394b) *(readme)* Add ci badge by @timonv
- [4076092](https://github.com/bosun-ai/swiftide/commit/40760929d24e20631d0552d87bdbb4fdf9195453) *(readme)* Clean up and consistent badge styles by @timonv
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/swiftide-v0.4.2...swiftide-v0.4.3
## [swiftide-v0.4.2](https://github.com/bosun-ai/swiftide/releases/tag/swiftide-v0.4.2) - 2024-06-26
### New features
- [926cc0c](https://github.com/bosun-ai/swiftide/commit/926cc0cca46023bcc3097a97b10ce03ae1fc3cc2) *(ingestion_stream)* Implement into for Result<Vec<IngestionNode>> by @timonv
### Bug fixes
- [3143308](https://github.com/bosun-ai/swiftide/commit/3143308136ec4e71c8a5f9a127119e475329c1a2) *(embed)* Panic if number of embeddings and node are equal by @timonv
### Miscellaneous
- [5ed08bb](https://github.com/bosun-ai/swiftide/commit/5ed08bb259b7544d3e4f2acdeef56231aa32e17c) Cleanup changelog by @timonv
### Docs
- [47aa378](https://github.com/bosun-ai/swiftide/commit/47aa378c4a70c47a2b313b6eca8dcf02b4723963) Create CONTRIBUTING.md by @timonv
- [0660d5b](https://github.com/bosun-ai/swiftide/commit/0660d5b08aed15d62f077363eae80f621ddaa510) Readme updates by @timonv
### Refactor
- [d285874](https://github.com/bosun-ai/swiftide/commit/d28587448d7fe342a79ac687cd5d7ee27354cae6) *(ingestion_pipeline)* Log_all combines other log helpers by @timonv
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/swiftide-v0.4.1...swiftide-v0.4.2
## [swiftide-v0.4.1](https://github.com/bosun-ai/swiftide/releases/tag/swiftide-v0.4.1) - 2024-06-24
### New features
- [3898ee7](https://github.com/bosun-ai/swiftide/commit/3898ee7d6273ee7034848f9ab08fd85613cb5b32) *(memory_storage)* Can be cloned safely preserving storage by @timonv
- [92052bf](https://github.com/bosun-ai/swiftide/commit/92052bfdbca8951620f6d016768d252e793ecb5d) *(transformers)* Allow for arbitrary closures as transformers and batchable transformers by @timonv
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/swiftide-v0.4.0...swiftide-v0.4.1
## [swiftide-v0.4.0](https://github.com/bosun-ai/swiftide/releases/tag/swiftide-v0.4.0) - 2024-06-23
### New features
- [477a284](https://github.com/bosun-ai/swiftide/commit/477a284597359472988ecde372e080f60aab0804) *(benchmarks)* Add benchmark for the file loader by @timonv
- [1567940](https://github.com/bosun-ai/swiftide/commit/15679409032e9be347fbe8838a308ff0d09768b8) *(benchmarks)* Add benchmark for simple local pipeline by @timonv
- [2228d84](https://github.com/bosun-ai/swiftide/commit/2228d84ccaad491e2c3cd0feb948050ad2872cf0) *(examples)* Example for markdown with all metadata by @timonv
- [9a1e12d](https://github.com/bosun-ai/swiftide/commit/9a1e12d34e02fe2292ce679251b96d61be74c884) *(examples,scraping)* Add example scraping and ingesting a url by @timonv
- [15deeb7](https://github.com/bosun-ai/swiftide/commit/15deeb72ca2e131e8554fa9cbefa3ef369de752a) *(ingestion_node)* Add constructor with defaults by @timonv
- [4d5c68e](https://github.com/bosun-ai/swiftide/commit/4d5c68e7bb09fae18832e2a453f114df5ba32ce1) *(ingestion_node)* Improved human readable Debug by @timonv
- [a5051b7](https://github.com/bosun-ai/swiftide/commit/a5051b79b2ce62d41dd93f7b34a1a065d9878732) *(ingestion_pipeline)* Optional error filtering and logging (#75) by @timonv
- [062107b](https://github.com/bosun-ai/swiftide/commit/062107b46474766640c38266f6fd6c27a95d4b57) *(ingestion_pipeline)* Implement throttling a pipeline (#77) by @timonv
- [a2ffc78](https://github.com/bosun-ai/swiftide/commit/a2ffc78f6d25769b9b7894f1f0703d51242023d4) *(ingestion_stream)* Improved stream developer experience (#81) by @timonv
````text
Improves stream ergonomics by providing convenient helpers and `Into`
for streams, vectors and iterators that match the internal type.
This means that in many cases, trait implementers can simply call
`.into()` instead of manually constructing a stream. In the case it's an
iterator, they can now use `IngestionStream::iter(<IntoIterator>)`
instead.
````
- [d260674](https://github.com/bosun-ai/swiftide/commit/d2606745de8b22dcdf02e244d1b044efe12c6ac7) *(integrations)* [**breaking**] Support fastembed (#60) by @timonv
````text
Adds support for FastEmbed with various models. Includes a breaking change, renaming the Embed trait to EmbeddingModel.
````
**BREAKING CHANGE**: support fastembed (#60)
- [9004323](https://github.com/bosun-ai/swiftide/commit/9004323dc5b11a3556a47e11fb8912ffc49f1e9e) *(integrations)* [**breaking**] Implement Persist for Redis (#80) by @timonv
**BREAKING CHANGE**: implement Persist for Redis (#80)
- [eb84dd2](https://github.com/bosun-ai/swiftide/commit/eb84dd27c61a1b3a4a52a53cc0404203eac729e8) *(integrations,transformers)* Add transformer for converting html to markdown by @timonv
- [ef7dcea](https://github.com/bosun-ai/swiftide/commit/ef7dcea45bfc336e7defcaac36bb5a6ff27d5acd) *(loaders)* File loader performance improvements by @timonv
- [6d37051](https://github.com/bosun-ai/swiftide/commit/6d37051a9c2ef24ea7eb3815efcf9692df0d70ce) *(loaders)* Add scraping using `spider` by @timonv
- [2351867](https://github.com/bosun-ai/swiftide/commit/235186707182e8c39b8f22c6dd9d54eb32f7d1e5) *(persist)* In memory storage for testing, experimentation and debugging by @timonv
- [4d5d650](https://github.com/bosun-ai/swiftide/commit/4d5d650f235395aa81816637d559de39853e1db1) *(traits)* Add automock for simpleprompt by @timonv
- [bd6f887](https://github.com/bosun-ai/swiftide/commit/bd6f8876d010d23f651fd26a48d6775c17c98e94) *(transformers)* Add transformers for title, summary and keywords by @timonv
### Bug fixes
- [7cbfc4e](https://github.com/bosun-ai/swiftide/commit/7cbfc4e13745ee5a6776a97fc6db06608fae8e81) *(ingestion_pipeline)* Concurrency does not work when spawned (#76) by @timonv
````text
Currency does did not work as expected. When spawning via `Tokio::spawn`
the future would be polled directly, and any concurrency setting would
not be respected. Because it had to be removed, improved tracing for
each step as well.
````
### Miscellaneous
- [f4341ba](https://github.com/bosun-ai/swiftide/commit/f4341babe5807b268ce86a88e0df4bfc6d756de4) *(ci)* Single changelog for all (future) crates in root (#57) by @timonv
- [7dde8a0](https://github.com/bosun-ai/swiftide/commit/7dde8a0811c7504b807b3ef9f508ce4be24967b8) *(ci)* Code coverage reporting (#58) by @timonv
````text
Post test coverage to Coveralls
Also enabled --all-features when running tests in ci, just to be sure
````
- [cb7a2cd](https://github.com/bosun-ai/swiftide/commit/cb7a2cd3a72f306a0b46556caee0a25c7ba2c0e0) *(scraping)* Exclude spider from test coverage by @timonv
- [7767588](https://github.com/bosun-ai/swiftide/commit/77675884a2eeb0aab6ce57dccd2a260f5a973197) *(transformers)* Improve test coverage by @timonv
- [3b7c0db](https://github.com/bosun-ai/swiftide/commit/3b7c0dbc2f020ce84a5da5691ee6eb415df2d466) Move changelog to root by @timonv
- [d6d0215](https://github.com/bosun-ai/swiftide/commit/d6d021560a05508add07a72f4f438d3ea3f1cb2c) Properly quote crate name in changelog by @timonv
- [f251895](https://github.com/bosun-ai/swiftide/commit/f2518950427ef758fd57e6e6189ce600adf19940) Documentation and feature flag cleanup (#69) by @timonv
````text
With fastembed added our dependencies become rather heavy. By default
now disable all integrations and either provide 'all' or cherry pick
integrations.
````
- [f6656be](https://github.com/bosun-ai/swiftide/commit/f6656becd199762843a59b0f86871753360a08f0) Cargo update by @timonv
### Docs
- [53ed920](https://github.com/bosun-ai/swiftide/commit/53ed9206835da1172295e296119ee9a883605f18) Hide the table of contents by @timonv
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/swiftide-v0.3.3...swiftide-v0.4.0
## [swiftide-v0.3.3](https://github.com/bosun-ai/swiftide/releases/tag/swiftide-v0.3.3) - 2024-06-16
### New features
- [bdaed53](https://github.com/bosun-ai/swiftide/commit/bdaed5334b3e122f803370cc688dd2f662db0b8d) *(integrations)* Clone and debug for integrations by @timonv
- [318e538](https://github.com/bosun-ai/swiftide/commit/318e538acb30ca516a780b5cc42c8ab2ed91cd6b) *(transformers)* Builder and clone for chunk_code by @timonv
- [c074cc0](https://github.com/bosun-ai/swiftide/commit/c074cc0edb8b0314de15f9a096699e3e744c9f33) *(transformers)* Builder for chunk_markdown by @timonv
- [e18e7fa](https://github.com/bosun-ai/swiftide/commit/e18e7fafae3007f1980bb617b7a72dd605720d74) *(transformers)* Builder and clone for MetadataQACode by @timonv
- [fd63dff](https://github.com/bosun-ai/swiftide/commit/fd63dffb4f0b11bb9fa4fadc7b076463eca111a6) *(transformers)* Builder and clone for MetadataQAText by @timonv
### Miscellaneous
- [678106c](https://github.com/bosun-ai/swiftide/commit/678106c01b7791311a24425c22ea39366b664033) *(ci)* Pretty names for pipelines (#54) by @timonv
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/swiftide-v0.3.2...swiftide-v0.3.3
## [swiftide-v0.3.2](https://github.com/bosun-ai/swiftide/releases/tag/swiftide-v0.3.2) - 2024-06-16
### New features
- [b211002](https://github.com/bosun-ai/swiftide/commit/b211002e40ef16ef240e142c0178b04636a4f9aa) *(integrations)* Qdrant and openai builder should be consistent (#52) by @timonv
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/swiftide-v0.3.1...swiftide-v0.3.2
## [swiftide-v0.3.1](https://github.com/bosun-ai/swiftide/releases/tag/swiftide-v0.3.1) - 2024-06-15
### Docs
- [6f63866](https://github.com/bosun-ai/swiftide/commit/6f6386693f3f6e0328eedaa4fb69cd8d0694574b) We love feedback <3 by @timonv
- [7d79b64](https://github.com/bosun-ai/swiftide/commit/7d79b645d2e4f7da05b4c9952a1ceb79583572b3) Fixing some grammar typos on README.md (#51) by @hectorip
### New Contributors
* @hectorip made their first contribution in [#51](https://github.com/bosun-ai/swiftide/pull/51)
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/swiftide-v0.3.0...swiftide-v0.3.1
## [swiftide-v0.3.0](https://github.com/bosun-ai/swiftide/releases/tag/swiftide-v0.3.0) - 2024-06-14
### New features
- [745b8ed](https://github.com/bosun-ai/swiftide/commit/745b8ed7e58f76e415501e6219ecec65551d1897) *(ingestion_pipeline)* [**breaking**] Support chained storage backends (#46) by @timonv
````text
Pipeline now supports multiple storage backends. This makes the order of adding storage important. Changed the name of the method to reflect that.
````
**BREAKING CHANGE**: support chained storage backends (#46)
- [cd055f1](https://github.com/bosun-ai/swiftide/commit/cd055f19096daa802fe7fc34763bfdfd87c1ec41) *(ingestion_pipeline)* Concurrency improvements (#48) by @timonv
- [1f0cd28](https://github.com/bosun-ai/swiftide/commit/1f0cd28ce4c02a39dbab7dd3c3f789798644daa3) *(ingestion_pipeline)* Early return if any error encountered (#49) by @timonv
- [fa74939](https://github.com/bosun-ai/swiftide/commit/fa74939b30bd31301e3f80c407f153b5d96aa007) Configurable concurrency for transformers and chunkers (#47) by @timonv
### Docs
- [473e60e](https://github.com/bosun-ai/swiftide/commit/473e60ecf9356e2fcabe68245f8bb8be7373cdfb) Update linkedin link by @timonv
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/swiftide-v0.2.1...swiftide-v0.3.0
## [swiftide-v0.2.1](https://github.com/bosun-ai/swiftide/releases/tag/swiftide-v0.2.1) - 2024-06-13
### Docs
- [cb9b4fe](https://github.com/bosun-ai/swiftide/commit/cb9b4feec1c3654f5067f9478b1a7cf59040a9fe) Add link to bosun by @timonv
- [e330ab9](https://github.com/bosun-ai/swiftide/commit/e330ab92d7e8d3f806280fa781f0e1b179d9b900) Fix documentation link by @timonv
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/swiftide-v0.2.0...swiftide-v0.2.1
## [swiftide-v0.2.0](https://github.com/bosun-ai/swiftide/releases/tag/swiftide-v0.2.0) - 2024-06-13
### New features
- [9ec93be](https://github.com/bosun-ai/swiftide/commit/9ec93be110bd047c7e276714c48df236b1a235d7) Api improvements with example (#10) by @timonv
### Bug fixes
- [42f8008](https://github.com/bosun-ai/swiftide/commit/42f80086042c659aef74ddd0ea1463c84650938d) Clippy & fmt by @timonv
- [5b7ffd7](https://github.com/bosun-ai/swiftide/commit/5b7ffd7368a2688f70892fe37f28c0baea7ad54f) Fmt by @timonv
### Docs
- [95a6200](https://github.com/bosun-ai/swiftide/commit/95a62008be1869e581ecaa0586a48cfbb6a7606a) *(swiftide)* Documented file swiftide/src/ingestion/ingestion_pipeline.rs (#14) by @bosun-ai[bot]
- [7abccc2](https://github.com/bosun-ai/swiftide/commit/7abccc2af890c8369a2b46940f35274080b3cb61) *(swiftide)* Documented file swiftide/src/ingestion/ingestion_stream.rs (#16) by @bosun-ai[bot]
- [755cd47](https://github.com/bosun-ai/swiftide/commit/755cd47ad00e562818162cf78e6df0c5daa99d14) *(swiftide)* Documented file swiftide/src/ingestion/ingestion_node.rs (#15) by @bosun-ai[bot]
- [2ea5a84](https://github.com/bosun-ai/swiftide/commit/2ea5a8445c8df7ef36e5fbc25f13c870e5a4dfd5) *(swiftide)* Documented file swiftide/src/integrations/openai/mod.rs (#21) by @bosun-ai[bot]
- [b319c0d](https://github.com/bosun-ai/swiftide/commit/b319c0d484db65d3a4594347e70770b8fac39e10) *(swiftide)* Documented file swiftide/src/integrations/treesitter/splitter.rs (#30) by @bosun-ai[bot]
- [29fce74](https://github.com/bosun-ai/swiftide/commit/29fce7437042f1f287987011825b57c58c180696) *(swiftide)* Documented file swiftide/src/integrations/redis/node_cache.rs (#29) by @bosun-ai[bot]
- [7229af8](https://github.com/bosun-ai/swiftide/commit/7229af8535daa450ebafd6c45c322222a2dd12a0) *(swiftide)* Documented file swiftide/src/integrations/qdrant/persist.rs (#24) by @bosun-ai[bot]
- [6240a26](https://github.com/bosun-ai/swiftide/commit/6240a260b582034970d2ee46da9f5234cf317820) *(swiftide)* Documented file swiftide/src/integrations/redis/mod.rs (#23) by @bosun-ai[bot]
- [7688c99](https://github.com/bosun-ai/swiftide/commit/7688c993125a129204739fc7cd8d23d0ebfc9022) *(swiftide)* Documented file swiftide/src/integrations/qdrant/mod.rs (#22) by @bosun-ai[bot]
- [d572c88](https://github.com/bosun-ai/swiftide/commit/d572c88f2b4cfc4bbdd7bd5ca93f7fd8460f1cb0) *(swiftide)* Documented file swiftide/src/integrations/qdrant/ingestion_node.rs (#20) by @bosun-ai[bot]
- [14e24c3](https://github.com/bosun-ai/swiftide/commit/14e24c30d28dc6272a5eb8275e758a2a989d66be) *(swiftide)* Documented file swiftide/src/ingestion/mod.rs (#28) by @bosun-ai[bot]
- [502939f](https://github.com/bosun-ai/swiftide/commit/502939fcb5f56b7549b97bb99d4d121bf030835f) *(swiftide)* Documented file swiftide/src/integrations/treesitter/supported_languages.rs (#26) by @bosun-ai[bot]
- [a78e68e](https://github.com/bosun-ai/swiftide/commit/a78e68e347dc3791957eeaf0f0adc050aeac1741) *(swiftide)* Documented file swiftide/tests/ingestion_pipeline.rs (#41) by @bosun-ai[bot]
- [289687e](https://github.com/bosun-ai/swiftide/commit/289687e1a6c0a9555a6cbecb24951522529f9e1a) *(swiftide)* Documented file swiftide/src/loaders/mod.rs (#40) by @bosun-ai[bot]
- [ebd0a5d](https://github.com/bosun-ai/swiftide/commit/ebd0a5dda940c5ef8c2b795ee8ab56e468726869) *(swiftide)* Documented file swiftide/src/transformers/chunk_code.rs (#39) by @bosun-ai[bot]
- [fb428d1](https://github.com/bosun-ai/swiftide/commit/fb428d1e250eded80d4edc8ccc0c9a9b840fc065) *(swiftide)* Documented file swiftide/src/transformers/metadata_qa_text.rs (#36) by @bosun-ai[bot]
- [305a641](https://github.com/bosun-ai/swiftide/commit/305a64149f015539823d748915e42ad440a7b4b4) *(swiftide)* Documented file swiftide/src/transformers/openai_embed.rs (#35) by @bosun-ai[bot]
- [c932897](https://github.com/bosun-ai/swiftide/commit/c93289740806d9283ba488dd640dad5e4339e07d) *(swiftide)* Documented file swiftide/src/transformers/metadata_qa_code.rs (#34) by @bosun-ai[bot]
- [090ef1b](https://github.com/bosun-ai/swiftide/commit/090ef1b38684afca8dbcbfe31a8debc2328042e5) *(swiftide)* Documented file swiftide/src/integrations/openai/simple_prompt.rs (#19) by @bosun-ai[bot]
- [7cfcc83](https://github.com/bosun-ai/swiftide/commit/7cfcc83eec29d8bed44172b497d4468b0b67d293) Update readme template links and fix template by @timonv
- [a717f3d](https://github.com/bosun-ai/swiftide/commit/a717f3d5a68d9c79f9b8d85d8cb8979100dc3949) Template links should be underscores by @timonv
### New Contributors
* @bosun-ai[bot] made their first contribution in [#19](https://github.com/bosun-ai/swiftide/pull/19)
**Full Changelog**: https://github.com/bosun-ai/swiftide/compare/v0.1.0...swiftide-v0.2.0
## [v0.1.0](https://github.com/bosun-ai/swiftide/releases/tag/v0.1.0) - 2024-06-13
### New features
- [2a6e503](https://github.com/bosun-ai/swiftide/commit/2a6e503e8abdab83ead7b8e62f39e222fa9f45d1) *(doc)* Setup basic readme (#5) by @timonv
- [b8f9166](https://github.com/bosun-ai/swiftide/commit/b8f9166e1d5419cf0d2cc6b6f0b2378241850574) *(fluyt)* Significant tracing improvements (#368) by @timonv
````text
* fix(fluyt): remove unnecessary cloning and unwraps
* fix(fluyt): also set target correctly on manual spans
* fix(fluyt): do not capture raw result
* feat(fluyt): nicer tracing for ingestion pipeline
* fix(fluyt): remove instrumentation on lazy methods
* feat(fluyt): add useful metadata to the root span
* fix(fluyt): fix dangling spans in ingestion pipeline
* fix(fluyt): do not log codebase in rag utils
````
- [0986136](https://github.com/bosun-ai/swiftide/commit/098613622a7018318f2fffe0d51cd17822bf2313) *(fluyt/code_ops)* Add languages to chunker and range for chunk size (#334) by @timonv
````text
* feat(fluyt/code_ops): add more treesitter languages
* fix: clippy + fmt
* feat(fluyt/code_ops): implement builder and support range
* feat(fluyt/code_ops): implement range limits for code chunking
* feat(fluyt/indexing): code chunking supports size
````
- [f10bc30](https://github.com/bosun-ai/swiftide/commit/f10bc304b0b2e28281c90e57b6613c274dc20727) *(ingestion_pipeline)* Default concurrency is the number of cpus (#6) by @timonv
- [7453ddc](https://github.com/bosun-ai/swiftide/commit/7453ddc387feb17906ae851a17695f4c8232ee19) Replace databuoy with new ingestion pipeline (#322) by @timonv
- [054b560](https://github.com/bosun-ai/swiftide/commit/054b560571b4a4398a551837536fb8fbff13c149) Fix build and add feature flags for all integrations by @timonv
### Bug fixes
- [fdf4be3](https://github.com/bosun-ai/swiftide/commit/fdf4be3d0967229a9dd84f568b0697fea4ddd341) *(fluyt)* Ensure minimal tracing by @timonv
- [389b0f1](https://github.com/bosun-ai/swiftide/commit/389b0f12039f29703bc8bb71919b8067fadf5a8e) Add debug info to qdrant setup by @timonv
- [bb905a3](https://github.com/bosun-ai/swiftide/commit/bb905a30d871ea3b238c3bc5cfd1d96724c8d4eb) Use rustls on redis and log errors by @timonv
- [458801c](https://github.com/bosun-ai/swiftide/commit/458801c16f9111c1070878c3a82a319701ae379c) Properly connect to redis over tls by @timonv
### Miscellaneous
- [ce6e465](https://github.com/bosun-ai/swiftide/commit/ce6e465d4fb12e2bbc7547738b5fbe5133ec2d5a) *(fluyt)* Add verbose log on checking if index exists by @timonv
- [6967b0d](https://github.com/bosun-ai/swiftide/commit/6967b0d5b6221f7620161969865fb31959fc93b8) Make indexing extraction compile by @tinco
- [f595f3d](https://github.com/bosun-ai/swiftide/commit/f595f3dae88bb4da5f4bbf6c5fe4f04abb4b7db3) Add rust-toolchain on stable by @timonv
- [da004c6](https://github.com/bosun-ai/swiftide/commit/da004c6fcf82579c3c75414cb9f04f02530e2e31) Start cleaning up dependencies by @timonv
- [cccdaf5](https://github.com/bosun-ai/swiftide/commit/cccdaf567744d58e0ee8ffcc8636f3b35090778f) Remove more unused dependencies by @timonv
- [7ee8799](https://github.com/bosun-ai/swiftide/commit/7ee8799aeccc56fb0c14dbe68a7126cabfb40dd3) Remove more crates and update by @timonv
- [951f496](https://github.com/bosun-ai/swiftide/commit/951f496498b35f7687fb556e5bf7f931a662ff8a) Clean up more crates by @timonv
- [1f17d84](https://github.com/bosun-ai/swiftide/commit/1f17d84cc218602a480b27974f23f64c4269134f) Cargo update by @timonv
- [730d879](https://github.com/bosun-ai/swiftide/commit/730d879e76c867c2097aef83bbbfa1211a053bdc) Create LICENSE by @timonv
- [44524fb](https://github.com/bosun-ai/swiftide/commit/44524fb51523291b9137fbdcaff9133a9a80c58a) Restructure repository and rename (#3) by @timonv
````text
* chore: move traits around
* chore: move crates to root folder
* chore: restructure and make it compile
* chore: remove infrastructure
* fix: make it compile
* fix: clippy
* chore: remove min rust version
* chore: cargo update
* chore: remove code_ops
* chore: settle on swiftide
````
- [e717b7f](https://github.com/bosun-ai/swiftide/commit/e717b7f0b1311b11ed4690e7e11d9fdf53d4a81b) Update issue templates by @timonv
- [8e22e0e](https://github.com/bosun-ai/swiftide/commit/8e22e0ef82fffa4f907b0e2cccd1c4e010ffbd01) Cleanup by @timonv
- [4d79d27](https://github.com/bosun-ai/swiftide/commit/4d79d27709e3fed32c1b1f2c1f8dbeae1721d714) Tests, tests, tests (#4) by @timonv
- [1036d56](https://github.com/bosun-ai/swiftide/commit/1036d565d8d9740ab55995095d495e582ce643d8) Configure cargo toml (#7) by @timonv
- [0ae98a7](https://github.com/bosun-ai/swiftide/commit/0ae98a772a751ddc60dd1d8e1606f9bdab4e04fd) Cleanup Cargo keywords by @timonv
### Refactor
- [0d342ea](https://github.com/bosun-ai/swiftide/commit/0d342eab747bc5f44adaa5b6131c30c09b1172a2) Models as first class citizens (#318) by @timonv
````text
* refactor: refactor common datastructures to /models
* refactor: promote to first class citizens
* fix: clippy
* fix: remove duplication in http handler
* fix: clippy
* fix: fmt
* feat: update for latest change
* fix(fluyt/models): doctest
````
================================================
FILE: CONTRIBUTING.md
================================================
# Contribution guidelines
Swiftide is in a very early stage and we are aware that we do lack features for the wider community. Contributions are very welcome. :tada:
Indexing and querying are performance sensitive tasks. Please make sure to consider allocations and performance when contributing.
AI Generated code is welcome and not frowned upon. Please be genuine and think critically about what you add.
For AI agents read the [AGENTS.md](AGENTS.md) for workspace layout, commands, and expectations tailored to agents.
## Feature requests and feedback
We love them, please let us know what you would like. Use one of the templates provided.
## Code design
* Simple, thin wrappers with sane defaults
* Provide a builder (derive_builder) for easy customization
* Keep Rust complexity (Arc/Box/Lifetimes/Pinning ...) encapsulated and away from library users
* Adhere to [Rust api naming](https://rust-lang.github.io/api-guidelines/naming.html) as much as possible
## Bug reports
It happens, but we still love them.
## Submitting pull requests
If you have a great idea, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!
If you just want to contribute (bless you!), see [our issues](https://github.com/bosun-ai/swiftide/issues).
1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'feat: Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
Make sure that:
* Public functions are documented in code
* Documentation is updated in the [user documentation](https://github.com/bosun-ai/swiftide-website)
* Tests are added
* Verified performance with benchmarks if applicable
================================================
FILE: Cargo.toml
================================================
cargo-features = ["edition2024"]
[workspace]
members = ["swiftide", "swiftide-*", "examples", "benchmarks"]
default-members = ["swiftide", "swiftide-*"]
resolver = "2"
[workspace.package]
version = "0.32.1"
edition = "2024"
license = "MIT"
readme = "README.md"
keywords = ["llm", "rag", "ai", "data", "openai"]
description = "Fast, streaming indexing, query, and agentic LLM applications in Rust"
categories = ["asynchronous"]
repository = "https://github.com/bosun-ai/swiftide"
homepage = "https://swiftide.rs"
[profile.dev.package]
insta.opt-level = 3
similar.opt-level = 3
[workspace.dependencies]
anyhow = { version = "1.0", default-features = false }
thiserror = { version = "2.0", default-features = false }
async-trait = { version = "0.1", default-features = false }
derive_builder = { version = "0.20", default-features = true }
fs-err = { version = "3.1", default-features = false }
futures-util = { version = "0.3", default-features = true }
tokio = { version = "1.46", features = [
"rt-multi-thread",
"time",
], default-features = false }
tokio-stream = { version = "0.1", default-features = false, features = [
"time",
] }
tokio-util = { version = "0.7", default-features = false }
tracing = { version = "0.1", features = [
"log",
"attributes",
], default-features = false }
num_cpus = { version = "1.17", default-features = false }
pin-project = { version = "1.1", default-features = false }
itertools = { version = "0.14", default-features = true }
serde = { version = "1.0", features = [
"derive",
"std",
], default-features = false }
serde_json = { version = "1.0", default-features = false, features = ["std"] }
strum = { version = "0.28", default-features = false }
strum_macros = { version = "0.28", default-features = false }
lazy_static = { version = "1.5", default-features = false }
chrono = { version = "0.4", default-features = false }
indoc = { version = "2.0", default-features = false }
regex = { version = "1.11", default-features = false }
uuid = { version = "1.18", features = [
"v3",
"v4",
"serde",
], default-features = false }
dyn-clone = { version = "1.0", default-features = false }
convert_case = { version = "0.11", default-features = false }
base64 = { version = "0.22", default-features = false, features = ["std"] }
# Mcp
rmcp = { version = "0.17", default-features = false, features = [
"base64",
"macros",
"server",
] }
schemars = { version = "1.0", default-features = false }
# Integrations
spider = { version = "2.45", default-features = false }
async-openai = { version = ">=0.33.0", default-features = false }
qdrant-client = { version = "1.17", default-features = false, features = [
"serde",
] }
fluvio = { version = "0.50.1", default-features = false }
rdkafka = { version = "0.39.0", features = ["cmake-build"] }
lancedb = { version = "0.26", default-features = false, features = ["remote"] }
# Needs to stay in sync with whatever lancdb uses, nice
arrow-array = { version = "57.1", default-features = false }
parquet = { version = "57.1", default-features = false, features = ["async"] }
redb = { version = "3.1", default-features = false }
sqlx = { version = "0.8", features = [
"postgres",
"uuid",
], default-features = false }
aws-config = { version = "1.8", default-features = true }
pgvector = { version = "0.4", features = ["sqlx"], default-features = false }
aws-credential-types = { version = "1.2", default-features = false }
aws-sdk-bedrockruntime = { version = "1.126", default-features = false }
aws-smithy-types = { version = "1.3", default-features = false }
criterion = { version = "0.8", default-features = false }
darling = { version = "0.23", default-features = false }
deadpool = { version = "0.13", default-features = false }
document-features = { version = "0.2" }
fastembed = { version = "5.5", default-features = false }
flv-util = { version = "0.5", default-features = false }
htmd = { version = "0.5", default-features = false }
ignore = { version = "0.4", default-features = false }
proc-macro2 = { version = "1.0", default-features = false }
quote = { version = "1.0", default-features = false }
redis = { version = "1.0", default-features = false }
reqwest = { version = "0.13", default-features = false }
secrecy = { version = "0.10", default-features = false }
syn = { version = "2.0", default-features = false }
tera = { version = "1.20", default-features = false }
text-splitter = { version = "0.29", default-features = false }
tracing-subscriber = { version = "0.3", default-features = true }
tree-sitter = { version = "0.26", default-features = false, features = ["std"] }
tree-sitter-java = { version = "0.23", default-features = false }
tree-sitter-javascript = { version = "0.25", default-features = false }
tree-sitter-python = { version = "0.25", default-features = false }
tree-sitter-ruby = { version = "0.23", default-features = false }
tree-sitter-rust = { version = "0.24", default-features = false }
tree-sitter-typescript = { version = "0.23", default-features = false }
tree-sitter-go = { version = "0.25", default-features = false }
tree-sitter-solidity = { version = "1.2", default-features = false }
tree-sitter-c = { version = "0.24", default-features = false }
tree-sitter-cpp = { version = "0.23", default-features = false }
tree-sitter-elixir = { version = "0.3.4", default-features = false }
tree-sitter-html = { version = "0.23", default-features = false }
tree-sitter-php = { version = "0.24", default-features = false }
tree-sitter-c-sharp = { version = "0.23", default-features = false }
async-anthropic = { version = "0.6.0", default-features = false }
duckdb = { version = "1", default-features = false }
libduckdb-sys = { version = "1", default-features = false }
metrics = { version = "0.24", default-features = false }
tiktoken-rs = { version = "0.9", default-features = false }
reqwest-eventsource = { version = "0.6", default-features = false }
# Testing
test-log = { version = "0.2" }
testcontainers = { version = "0.27", features = ["http_wait"] }
testcontainers-modules = { version = "0.15" }
mockall = { version = "0.14" }
temp-dir = { version = "0.2" }
wiremock = { version = "0.6" }
test-case = { version = "3.3" }
pretty_assertions = { version = "1.4" }
insta = { version = "1.45", features = ["yaml", "filters"] }
eventsource-stream = { version = "0.2" }
[workspace.lints.rust]
unsafe_code = "forbid"
unexpected_cfgs = { level = "warn", check-cfg = [
'cfg(coverage,coverage_nightly)',
] }
[workspace.lints.clippy]
cargo = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
blocks_in_conditions = "allow"
must_use_candidate = "allow"
module_name_repetitions = "allow"
missing_fields_in_debug = "allow"
# Should be fixed asap
multiple_crate_versions = "allow"
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2024 Bosun.ai
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
<details>
<summary>Table of Contents</summary>
<!--toc:start-->
- [What is Swiftide?](#what-is-swiftide)
- [High level features](#high-level-features)
- [Latest updates on our blog :fire:](#latest-updates-on-our-blog-fire)
- [Examples](#examples)
- [Vision](#vision)
- [Features](#features)
- [In detail](#in-detail)
- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Usage and concepts](#usage-and-concepts)
- [Indexing](#indexing)
- [Querying](#querying)
- [Contributing](#contributing)
- [Core Team Members](#core-team-members)
- [License](#license)
<!--toc:end-->
</details>
<a name="readme-top"></a>
<!-- PROJECT SHIELDS -->
<!--
*** I'm using markdown "reference style" links for readability.
*** Reference links are enclosed in brackets [ ] instead of parentheses ( ).
*** See the bottom of this document for the declaration of the reference variables
*** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.
*** https://www.markdownguide.org/basic-syntax/#reference-style-links
-->


[![Crate Badge]][Crate]
[![Docs Badge]][API Docs]
[![Contributors][contributors-shield]][contributors-url]
[![Stargazers][stars-shield]][stars-url]

[![MIT License][license-shield]][license-url]
[![LinkedIn][linkedin-shield]][linkedin-url]
<!-- PROJECT LOGO -->
<br />
<div align="center">
<a href="https://github.com/bosun-ai/swiftide">
<img src="https://raw.githubusercontent.com/bosun-ai/swiftide/master/images/logo.png" alt="Logo" width="250" height="250">
</a>
<h3 align="center">Swiftide</h3>
<p align="center">
Fast, streaming indexing, query, and agentic LLM applications in Rust
<br />
<a href="https://swiftide.rs"><strong>Read more on swiftide.rs »</strong></a>
<br />
<br />
<!-- <a href="https://github.com/bosun-ai/swiftide">View Demo</a> -->
<a href="https://docs.rs/swiftide/latest/swiftide/">API Docs</a>
·
<a href="https://github.com/bosun-ai/swiftide/issues/new?labels=bug&template=bug_report.md">Report Bug</a>
·
<a href="https://github.com/bosun-ai/swiftide/issues/new?labels=enhancement&template=feature_request.md">Request Feature</a>
·
<a href="https://discord.gg/3jjXYen9UY">Discord</a>
</p>
</div>
<!-- ABOUT THE PROJECT -->
<p align="right">(<a href="#readme-top">back to top</a>)</p>
## What is Swiftide?
<!-- [![Product Name Screen Shot][product-screenshot]](https://example.com) -->
Swiftide is a Rust library for building LLM applications. From performing a simple prompt completion, to building fast, streaming indexing and querying pipelines, to building agents that can use tools and call other agents.
### High level features
- Simple primitives for common LLM tasks
- Build fast, streaming indexing and querying pipelines
- Easily build agents, mix and match with previously built pipelines
- A modular and extendable API, with minimal abstractions
- Integrations with popular LLMs and storage providers
- Ready to use pipeline transformations or bring your own
- Build graph like workflows with Tasks
- [Langfuse](https://langfuse.com) support
<div align="center">
<img src="https://raw.githubusercontent.com/bosun-ai/swiftide/master/images/overview.png" alt="Swiftide overview" width="100%" >
</div>
Part of the [bosun.ai](https://bosun.ai) project. An upcoming platform for autonomous code improvement.
We <3 feedback: project ideas, suggestions, and complaints are very welcome. Feel free to open an issue or contact us on [discord](https://discord.gg/3jjXYen9UY).
> [!CAUTION]
> Swiftide is under heavy development and can have breaking changes. Documentation might fall short of all features, and despite our efforts be slightly outdated. We recommend to always keep an eye on our [github](https://github.com/bosun-ai/swiftide) and [api documentation](https://docs.rs/swiftide/latest/swiftide/). If you found an issue or have any kind of feedback we'd love to hear from you.
<p align="right">(<a href="#readme-top">back to top</a>)</p>
## Latest updates on our blog :fire:
- [Swiftide 0.31 - Tasks, Langfuse, Multi-Modal, and more](http://blog.bosun.ai/swiftide-0-31/)
- [Swiftide 0.27 - Easy human-in-the-loop flows for agentic AI](http://blog.bosun.ai/swiftide-0-27/)
- [Swiftide 0.26 - Streaming agents](http://blog.bosun.ai/swiftide-0-26/)
- [Releasing kwaak with kwaak](https://bosun.ai/posts/releasing-kwaak-with-kwaak/)
- [Swiftide 0.16 - AI Agents in Rust](https://bosun.ai/posts/swiftide-0-16/)
- [Rust in LLM based tools for performance](https://bosun.ai/posts/rust-for-genai-performance/)
- [Evaluate Swiftide pipelines with Ragas](https://bosun.ai/posts/evaluating-swiftide-with-ragas/) (2024-09-15)
- [Release - Swiftide 0.12](https://bosun.ai/posts/swiftide-0-12/) (2024-09-13)
- [Local code intel with Ollama, FastEmbed and OpenTelemetry](https://bosun.ai/posts/ollama-and-telemetry/) (2024-09-04)
More on our [blog](https://blog.bosun.ai/)
<p align="right">(<a href="#readme-top">back to top</a>)</p>
## Examples
Indexing a local code project, chunking into smaller pieces, enriching the nodes with metadata, and persisting into [Qdrant](https://qdrant.tech):
```rust
indexing::Pipeline::from_loader(FileLoader::new(".").with_extensions(&["rs"]))
.with_default_llm_client(openai_client.clone())
.filter_cached(Redis::try_from_url(
redis_url,
"swiftide-examples",
)?)
.then_chunk(ChunkCode::try_for_language_and_chunk_size(
"rust",
10..2048,
)?)
.then(MetadataQACode::default())
.then(move |node| my_own_thing(node))
.then_in_batch(Embed::new(openai_client.clone()))
.then_store_with(
Qdrant::builder()
.batch_size(50)
.vector_size(1536)
.build()?,
)
.run()
.await?;
```
Querying for an example on how to use the query pipeline:
```rust
query::Pipeline::default()
.then_transform_query(GenerateSubquestions::from_client(
openai_client.clone(),
))
.then_transform_query(Embed::from_client(
openai_client.clone(),
))
.then_retrieve(qdrant.clone())
.then_answer(Simple::from_client(openai_client.clone()))
.query("How can I use the query pipeline in Swiftide?")
.await?;
```
Running an agent that can search code:
```rust
#[swiftide::tool(
description = "Searches code",
param(name = "code_query", description = "The code query")
)]
async fn search_code(
context: &dyn AgentContext,
code_query: &str,
) -> Result<ToolOutput, ToolError> {
let command_output = context
.executor()
.exec_cmd(&Command::shell(format!("rg '{code_query}'")))
.await?;
Ok(command_output.into())
}
agents::Agent::builder()
.llm(&openai)
.tools(vec![search_code()])
.build()?
.query("In what file can I find an example of a swiftide agent?")
.await?;
```
Agents loop over LLM calls, tool calls, and lifecycle hooks until a final answer is reached.
_You can find more detailed examples in [/examples](https://github.com/bosun-ai/swiftide/tree/master/examples)_
<p align="right">(<a href="#readme-top">back to top</a>)</p>
## Vision
Our goal is to create a fast, extendable platform for building LLM applications in Rust, to further the development of automated AI applications, with an easy-to-use and easy-to-extend api.
<p align="right">(<a href="#readme-top">back to top</a>)</p>
## Features
- Simple primitives for common LLM tasks
- Fast, modular streaming indexing pipeline with async, parallel processing
- Experimental query pipeline
- Experimental agent framework
- A variety of loaders, transformers, semantic chunkers, embedders, and more
- Bring your own transformers by extending straightforward traits or use a closure
- Splitting and merging pipelines
- Jinja-like templating for prompts
- Store into multiple backends
- Integrations with OpenAI, Groq, Gemini, Anthropic, Redis, Qdrant, Ollama, FastEmbed-rs, Fluvio, LanceDB, and Treesitter
- Evaluate pipelines with RAGAS
- Sparse vector support for hybrid search
- `tracing` supported for logging and tracing, see /examples and the `tracing` crate for more information.
- Tracing layer for exporting to Langfuse
### In detail
| **Feature** | **Details** |
| -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Supported Large Language Model providers** | OpenAI (and Azure) <br> Anthropic <br> Gemini <br> OpenRouter <br> AWS Bedrock (Converse API) <br> Groq - All models <br> Ollama - All models |
| **Agents** | All the boiler plate for autonomous agents so you don't have to |
| **Tasks** | Build graph like workflows with tasks, combining all the above to build complex applications |
| **Loading data** | Files <br> Scraping <br> Fluvio <br> Parquet <br> Kafka <br> Other pipelines and streams |
| **Example and pre-build transformers and metadata generation** | Generate Question and answerers for both text and code (Hyde) <br> Summaries, titles and queries via an LLM <br> Extract definitions and references with tree-sitter |
| **Splitting and chunking** | Markdown <br> Text (text_splitter) <br> Code (with tree-sitter) |
| **Storage** | Qdrant <br> Redis <br> LanceDB <br> Postgres <br> Duckdb |
| **Query pipeline** | Similarity and hybrid search, query and response transformations, and evaluation |
<p align="right">(<a href="#readme-top">back to top</a>)</p>
<!-- GETTING STARTED -->
## Getting Started
### Prerequisites
Make sure you have the rust toolchain installed. [rustup](https://rustup.rs) Is the recommended approach.
To use OpenAI, an API key is required. Note that by default `async_openai` uses the `OPENAI_API_KEY` environment variables.
Other integrations might have their own requirements.
### Installation
1. Set up a new Rust project
2. Add swiftide
```sh
cargo add swiftide
```
3. Enable the features of integrations you would like to use in your `Cargo.toml`
4. Write a pipeline (see our examples and documentation)
<p align="right">(<a href="#readme-top">back to top</a>)</p>
<!-- USAGE EXAMPLES -->
## Usage and concepts
Before building your streams, you need to enable and configure any integrations required. See /examples.
_We have a lot of examples, please refer to /examples and the [Documentation](https://docs.rs/swiftide/latest/swiftide/)_
> [!NOTE]
> No integrations are enabled by default as some are code heavy. We recommend you to cherry-pick the integrations you need. By convention flags have the same name as the integration they represent.
### Indexing
An indexing stream starts with a Loader that emits Nodes. For instance, with the Fileloader each file is a Node.
You can then slice and dice, augment, and filter nodes. Each different kind of step in the pipeline requires different traits. This enables extension.
Nodes are generic over their inner type. This is a transition in progress, but when you BYO, feel free to slice and dice. The inner type can change midway through the pipeline.
- **from_loader** `(impl Loader)` starting point of the stream, creates and emits Nodes
- **filter_cached** `(impl NodeCache)` filters cached nodes
- **then** `(impl Transformer)` transforms the node and puts it on the stream
- **then_in_batch** `(impl BatchTransformer)` transforms multiple nodes and puts them on the stream
- **then_chunk** `(impl ChunkerTransformer)` transforms a single node and emits multiple nodes
- **then_store_with** `(impl Storage)` stores the nodes in a storage backend, this can be chained
Additionally, several generic transformers are implemented. They take implementers of `SimplePrompt` and `EmbedModel` to do their things.
> [!WARNING]
> Due to the performance, chunking before adding metadata gives rate limit errors on OpenAI very fast, especially with faster models like gpt-5-nano. Be aware. The `async-openai` crate provides an exmponential backoff strategy. If that is still a problem, there is also a decorator that supports streaming in `swiftide_core/indexing_decorators`.
### Querying
A query stream starts with a search strategy. In the query pipeline a `Query` goes through several stages. Transformers and retrievers work together to get the right context into a prompt, before generating an answer. Transformers and Retrievers operate on different stages of the Query via a generic statemachine. Additionally, the search strategy is generic over the pipeline and Retrievers need to implement specifically for each strategy.
That sounds like a lot but, tl&dr; the query pipeline is _fully and strongly typed_.
- **Pending** The query has not been executed, and can be further transformed with transformers
- **Retrieved** Documents have been retrieved, and can be further transformed to provide context for an answer
- **Answered** The query is done
Additionally, query pipelines can also be evaluated. I.e. by [Ragas](https://ragas.io).
Similar to the indexing pipeline each step is governed by simple Traits and closures implement these traits as well.
<p align="right">(<a href="#readme-top">back to top</a>)</p>
<!-- ROADMAP -->
## Contributing
Swiftide is in a very early stage and we are aware that we lack features for the wider community. Contributions are very welcome. :tada:
If you have a great idea, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!
Indexing and querying are performance sensitive tasks. Please make sure to consider allocations and performance when contributing.
AI Generated code is welcome and not frowned upon. Please be genuine and think critically about what you add.
If you just want to contribute (bless you!), see [our issues](https://github.com/bosun-ai/swiftide/issues) or join us on Discord.
1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'feat: Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
AI Agents can refer to [AGENTS.md](AGENTS.md) for workspace layout, commands, and expectations tailored to agents.
<p align="right">(<a href="#readme-top">back to top</a>)</p>
## Core Team Members
<table>
<tr>
<td align="center">
<a href="https://github.com/timonv">
<img
src="https://avatars.githubusercontent.com/u/49373?s=100"
width="100px;"
alt=""
/>
<br /><sub><b>timonv</b></sub>
<br /><sub>open for swiftide consulting</sub>
</a>
</td>
<td align="center">
<a href="https://github.com/tinco">
<img
src="https://avatars.githubusercontent.com/u/22532?s=100"
width="100px;"
alt=""
/>
<br /><sub><b>tinco</b></sub>
<br /><br />
</a>
</td>
</tr>
</table>
<!-- LICENSE -->
## License
Distributed under the MIT License. See `LICENSE` for more information.
<p align="right">(<a href="#readme-top">back to top</a>)</p>
<!-- MARKDOWN LINKS & IMAGES -->
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
[contributors-shield]: https://img.shields.io/github/contributors/bosun-ai/swiftide.svg?style=flat-square
[contributors-url]: https://github.com/bosun-ai/swiftide/graphs/contributors
[stars-shield]: https://img.shields.io/github/stars/bosun-ai/swiftide.svg?style=flat-square
[stars-url]: https://github.com/bosun-ai/swiftide/stargazers
[license-shield]: https://img.shields.io/github/license/bosun-ai/swiftide.svg?style=flat-square
[license-url]: https://github.com/bosun-ai/swiftide/blob/master/LICENSE.txt
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=flat-square&logo=linkedin&colorB=555
[linkedin-url]: https://www.linkedin.com/company/bosun-ai
[Crate Badge]: https://img.shields.io/crates/v/swiftide?logo=rust&style=flat-square&logoColor=E05D44&color=E05D44
[Crate]: https://crates.io/crates/swiftide
[Docs Badge]: https://img.shields.io/docsrs/swiftide?logo=rust&style=flat-square&logoColor=E05D44
[API Docs]: https://docs.rs/swiftide
================================================
FILE: benchmarks/Cargo.toml
================================================
cargo-features = ["edition2024"]
[package]
name = "benchmarks"
publish = false
version.workspace = true
edition.workspace = true
license.workspace = true
readme.workspace = true
keywords.workspace = true
description.workspace = true
categories.workspace = true
repository.workspace = true
homepage.workspace = true
[dev-dependencies]
tokio = { workspace = true, features = ["full"] }
swiftide = { path = "../swiftide", features = ["all", "redb"] }
serde_json = { workspace = true }
criterion = { workspace = true, features = ["html_reports", "async_tokio"] }
anyhow = { workspace = true }
futures-util = { workspace = true }
testcontainers = { workspace = true, features = ["blocking"] }
temp-dir = { workspace = true }
[[bench]]
name = "fileloader"
path = "fileloader.rs"
harness = false
[[bench]]
name = "index-readme-local"
path = "local_pipeline.rs"
harness = false
[[bench]]
name = "node-cache"
path = "node_cache_comparison.rs"
harness = false
================================================
FILE: benchmarks/fileloader.rs
================================================
use std::hint::black_box;
use anyhow::Result;
use criterion::{Criterion, criterion_group, criterion_main};
use futures_util::stream::{StreamExt, TryStreamExt};
use swiftide::traits::Loader;
async fn run_fileloader(num_files: usize) -> Result<usize> {
let mut total_nodes = 0;
let mut stream = swiftide::indexing::loaders::FileLoader::new("./benchmarks/fileloader.rs")
.with_extensions(&["rs"])
.into_stream()
.take(num_files);
while stream.try_next().await?.is_some() {
total_nodes += 1;
}
assert!(total_nodes == num_files);
Ok(total_nodes)
}
fn criterion_benchmark(c: &mut Criterion) {
c.bench_function("load_1", |b| b.iter(|| run_fileloader(black_box(1))));
c.bench_function("load_10", |b| b.iter(|| run_fileloader(black_box(10))));
}
criterion_group!(benches, criterion_benchmark);
criterion_main!(benches);
================================================
FILE: benchmarks/local_pipeline.rs
================================================
use anyhow::Result;
use criterion::{Criterion, criterion_group, criterion_main};
use swiftide::{
indexing::Pipeline,
indexing::loaders::FileLoader,
indexing::persist::MemoryStorage,
indexing::transformers::{ChunkMarkdown, Embed},
integrations::fastembed::FastEmbed,
};
async fn run_pipeline() -> Result<()> {
Pipeline::from_loader(FileLoader::new("README.md").with_extensions(&["md"]))
.then_chunk(ChunkMarkdown::from_chunk_range(20..256))
.then_in_batch(Embed::new(FastEmbed::builder().batch_size(10).build()?))
.then_store_with(MemoryStorage::default())
.run()
.await
}
fn criterion_benchmark(c: &mut Criterion) {
c.bench_function("run_local_pipeline", |b| b.iter(run_pipeline));
}
criterion_group!(benches, criterion_benchmark);
criterion_main!(benches);
================================================
FILE: benchmarks/node_cache_comparison.rs
================================================
use anyhow::Result;
use criterion::{BenchmarkId, Criterion, criterion_group, criterion_main};
use swiftide::indexing::transformers::ChunkCode;
use swiftide::{
indexing::{Pipeline, loaders::FileLoader, persist::MemoryStorage},
traits::NodeCache,
};
use temp_dir::TempDir;
use testcontainers::Container;
use testcontainers::{
GenericImage,
core::{IntoContainerPort, WaitFor},
runners::SyncRunner,
};
async fn run_pipeline(node_cache: Box<dyn NodeCache<Input = String>>) -> Result<()> {
Pipeline::from_loader(FileLoader::new(".").with_extensions(&["rs"]))
.filter_cached(node_cache)
.then_chunk(ChunkCode::try_for_language_and_chunk_size("rust", 10..256)?)
.then_store_with(MemoryStorage::default())
.run()
.await
}
fn criterion_benchmark(c: &mut Criterion) {
let redis_container = start_redis();
let redis_url = format!(
"redis://{host}:{port}",
host = redis_container.get_host().unwrap(),
port = redis_container.get_host_port_ipv4(6379).unwrap()
);
let redis: Box<dyn NodeCache<Input = String>> = Box::new(
swiftide::integrations::redis::Redis::try_from_url(redis_url, "criterion").unwrap(),
);
let tempdir = TempDir::new().unwrap();
let redb: Box<dyn NodeCache<Input = String>> = Box::new(
swiftide::integrations::redb::Redb::builder()
.database_path(tempdir.child("criterion"))
.build()
.unwrap(),
);
let runtime = tokio::runtime::Builder::new_multi_thread()
.enable_all()
.build()
.unwrap();
for node_cache in [(redis, "redis"), (redb, "redb")] {
c.bench_with_input(
BenchmarkId::new("node_cache", node_cache.1),
&node_cache,
|b, s| {
let cache_clone = s.0.clone();
runtime.spawn_blocking(move || async move { cache_clone.clear().await.unwrap() });
b.to_async(&runtime).iter(|| run_pipeline(s.0.clone()))
},
);
}
}
fn start_redis() -> Container<GenericImage> {
GenericImage::new("redis", "7.2.4")
.with_exposed_port(6379.tcp())
.with_wait_for(WaitFor::message_on_stdout("Ready to accept connections"))
.start()
.expect("Redis started")
}
criterion_group!(benches, criterion_benchmark);
criterion_main!(benches);
================================================
FILE: benchmarks/output.txt
================================================
test load_1 ... bench: 6 ns/iter (+/- 0)
test load_10 ... bench: 6 ns/iter (+/- 0)
test run_local_pipeline ... bench: 846 ns/iter (+/- 7)
================================================
FILE: cliff.toml
================================================
[remote.github]
owner = "bosun-ai"
repo = "swiftide"
[git]
commit_parsers = [
{ message = "(r|R)elease", skip = true },
{ message = "^(feat|fix|perf|chore)\\(ci\\)", group = "<!-- 3 -->Miscellaneous" },
{ message = "^feat*", group = "<!-- 0 -->New features" },
{ message = "^fix*", group = "<!-- 1 -->Bug fixes" },
{ message = "^perf*", group = "<!-- 2 -->Performance" },
{ message = "^chore*", group = "<!-- 3 -->Miscellaneous" },
]
[changelog]
# changelog header
header = """
# Changelog
All notable changes to this project will be documented in this file.
"""
body = """
{%- if not version %}
## [unreleased]
{% else -%}
## [{{ version }}](https://github.com/bosun-ai/swiftide/releases/tag/{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }}
{% endif -%}
{% macro commit(commit) -%}
- [{{ commit.id | truncate(length=7, end="") }}]({{ "https://github.com/bosun-ai/swiftide/commit/" ~ commit.id }}) \
{% if commit.scope %}*({{commit.scope | default(value = "uncategorized") | lower }})* {% endif %}\
{%- if commit.breaking %} [**breaking**]{% endif %} \
{{ commit.message | upper_first | trim }}\
{% if commit.remote.username %} by @{{ commit.remote.username }}{%- endif -%}\
{%- if commit.links %} \
in {% for link in commit.links %}[{{link.text}}]({{link.href}}) {% endfor -%}\
{% endif %}
{%- if commit.body and commit.remote.username and commit.remote.username is not containing("[bot]") %}
````text {#- 4 backticks escape any backticks in body #}
{{commit.body | indent(prefix=" ") }}
````
{%- endif %}
{%- if commit.breaking_description %}
**BREAKING CHANGE**: {{ commit.breaking_description }}
{%- endif %}
{% endmacro -%}
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits | filter(attribute="scope") | sort(attribute="scope") %}
{{ self::commit(commit=commit) }}
{%- endfor -%}
{% for commit in commits %}
{%- if not commit.scope %}
{{ self::commit(commit=commit) }}
{%- endif -%}
{%- endfor -%}
{%- endfor %}
{%- if github.contributors -%}
{% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}
### New Contributors
{%- endif %}\
{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %}
* @{{ contributor.username }} made their first contribution
{%- if contributor.pr_number %} in \
[#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \
{%- endif %}
{%- endfor -%}
{% endif -%}
{% if version %}
{% if previous.version %}
**Full Changelog**: {{ self::remote_url() }}/compare/{{ previous.version }}...{{ version }}
{% endif %}
{% else -%}
{% raw %}\n{% endraw %}
{% endif %}
{%- macro remote_url() -%}
{%- if remote.github -%}
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}\
{% else -%}
https://github.com/bosun-ai/swiftide
{%- endif -%}
{% endmacro %}
""" # template for the changelog body
# https://keats.github.io/tera/docs/#introduction
# note that the - before / after the % controls whether whitespace is rendered between each line.
# Getting this right so that the markdown renders with the correct number of lines between headings
# code fences and list items is pretty finicky. Note also that the 4 backticks in the commit macro
# is intentional as this escapes any backticks in the commit body.
# remove the leading and trailing whitespace from the template
trim = false
# changelog footer
================================================
FILE: deny.toml
================================================
[graph]
all-features = true
[licenses]
confidence-threshold = 0.8
allow = [
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause",
"ISC",
"MIT",
"Unicode-DFS-2016",
"MPL-2.0",
"Apache-2.0 WITH LLVM-exception",
"Unlicense",
"CC0-1.0",
"zlib-acknowledgement",
"Zlib",
"0BSD",
"Unicode-3.0",
"NCSA",
]
exceptions = [{ allow = ["OpenSSL"], crate = "ring" }]
[advisories]
version = 2
ignore = [
{ id = "RUSTSEC-2023-0086", reason = "Ignore a security adivisory on lexical-core" },
{ id = "RUSTSEC-2021-0141", reason = "Dotenv is used by spider" },
{ id = "RUSTSEC-2024-0384", reason = "Instant is unmaintained" },
{ id = "RUSTSEC-2024-0421", reason = "Older version of idna used by reqwest" },
]
[bans]
multiple-versions = "allow"
[sources]
unknown-registry = "deny"
unknown-git = "warn"
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
[[licenses.clarify]]
crate = "ring"
# SPDX considers OpenSSL to encompass both the OpenSSL and SSLeay licenses
# https://spdx.org/licenses/OpenSSL.html
# ISC - Both BoringSSL and ring use this for their new files
# MIT - "Files in third_party/ have their own licenses, as described therein. The MIT
# license, for third_party/fiat, which, unlike other third_party directories, is
# compiled into non-test libraries, is included below."
# OpenSSL - Obviously
expression = "ISC AND MIT AND OpenSSL"
license-files = [{ path = "LICENSE", hash = 0xbd0eed23 }]
================================================
FILE: examples/Cargo.toml
================================================
cargo-features = ["edition2024"]
[package]
name = "swiftide-examples"
publish = false
version.workspace = true
edition.workspace = true
license.workspace = true
readme.workspace = true
keywords.workspace = true
description.workspace = true
categories.workspace = true
repository.workspace = true
homepage.workspace = true
[dependencies]
tokio = { workspace = true, features = ["full"] }
swiftide = { path = "../swiftide/", features = [
"all",
"scraping",
"aws-bedrock",
"groq",
"ollama",
"fluvio",
"kafka",
"lancedb",
"pgvector",
"swiftide-agents",
"dashscope",
"mcp",
"anthropic",
"gemini",
"metrics",
"langfuse",
] }
swiftide-macros = { path = "../swiftide-macros" }
tracing-subscriber = { workspace = true, features = ["fmt", "env-filter"] }
serde_json = { workspace = true }
spider = { workspace = true }
fluvio = { workspace = true }
temp-dir = { workspace = true }
anyhow = { workspace = true }
futures-util = { workspace = true }
sqlx = { workspace = true }
swiftide-test-utils = { path = "../swiftide-test-utils" }
tracing = { workspace = true }
serde = { workspace = true }
rmcp = { workspace = true, features = [
"transport-child-process",
"client",
"server",
] }
metrics = { workspace = true }
schemars.workspace = true
base64 = { workspace = true }
[[example]]
doc-scrape-examples = true
name = "index-codebase"
path = "index_codebase.rs"
[[example]]
name = "index-codebase-reduced-context"
path = "index_codebase_reduced_context.rs"
[[example]]
doc-scrape-examples = true
name = "fastembed"
path = "fastembed.rs"
[[example]]
doc-scrape-examples = true
name = "index-redis"
path = "index_into_redis.rs"
[[example]]
doc-scrape-examples = true
name = "index-markdown-metadata"
path = "index_markdown_lots_of_metadata.rs"
[[example]]
doc-scrape-examples = true
name = "scraping-index"
path = "scraping_index_to_markdown.rs"
[[example]]
doc-scrape-examples = true
name = "aws-bedrock"
path = "aws_bedrock.rs"
[[example]]
name = "aws-bedrock-agent"
path = "aws_bedrock_agent.rs"
[[example]]
doc-scrape-examples = true
name = "store-multiple-vectors"
path = "store_multiple_vectors.rs"
[[example]]
name = "index-groq"
path = "index_groq.rs"
[[example]]
name = "index-ollama"
path = "index_ollama.rs"
[[example]]
name = "query-pipeline"
path = "query_pipeline.rs"
[[example]]
name = "hybrid-search"
path = "hybrid_search.rs"
[[example]]
name = "fluvio"
path = "fluvio.rs"
[[example]]
name = "kakfa"
path = "kafka.rs"
[[example]]
name = "lancedb"
path = "lancedb.rs"
[[example]]
name = "describe-image"
path = "describe_image.rs"
[[example]]
name = "hello-agents"
path = "hello_agents.rs"
[[example]]
name = "index-md-pgvector"
path = "index_md_into_pgvector.rs"
[[example]]
name = "dashscope"
path = "dashscope.rs"
[[example]]
name = "reranking"
path = "reranking.rs"
[[example]]
name = "agents-mcp"
path = "agents_mcp_tools.rs"
[[example]]
name = "agents-resume"
path = "agents_resume.rs"
[[example]]
name = "streaming-agents"
path = "streaming_agents.rs"
[[example]]
name = "agents-hitl"
path = "agents_with_human_in_the_loop.rs"
[[example]]
name = "usage-metrics"
path = "usage_metrics.rs"
[[example]]
name = "tasks"
path = "tasks.rs"
[[example]]
name = "agent-can-fail-custom-schema"
path = "agent_can_fail_custom_schema.rs"
[[example]]
name = "stop-with-args-custom-schema"
path = "stop_with_args_custom_schema.rs"
[[example]]
name = "responses-api"
path = "responses_api.rs"
[[example]]
name = "responses-api-reasoning"
path = "responses_api_reasoning.rs"
[[example]]
name = "structured-prompt"
path = "structured_prompt.rs"
[[example]]
name = "langfuse"
path = "langfuse.rs"
[[example]]
name = "tool-custom-schema"
path = "tool_custom_schema.rs"
================================================
FILE: examples/agent_can_fail_custom_schema.rs
================================================
//! Demonstrates how to replace the default failure arguments for `AgentCanFail` with a custom
//! JSON schema and capture the structured failure payload when the agent stops.
//!
//! Set the `OPENAI_API_KEY` environment variable before running the example. The agent is guided
//! to use the `task_failed` tool with the schema defined below whenever it cannot complete the
//! task.
use anyhow::Result;
use schemars::{JsonSchema, Schema, schema_for};
use serde::{Deserialize, Serialize};
use serde_json::{self, to_string_pretty};
use swiftide::agents::tools::control::AgentCanFail;
use swiftide::agents::{Agent, StopReason};
use swiftide::traits::Tool;
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
#[serde(rename_all = "snake_case")]
enum FailureCategory {
MissingDependency,
PermissionDenied,
UnexpectedRegression,
}
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
#[serde(rename_all = "snake_case")]
enum RemediationStatus {
Planned,
Blocked,
Complete,
}
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
#[schemars(deny_unknown_fields)]
struct FailureReport {
category: FailureCategory,
summary: String,
impact: String,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
recommended_actions: Vec<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
remediation_status: Option<RemediationStatus>,
}
fn failure_schema() -> Schema {
schema_for!(FailureReport)
}
#[tokio::main]
async fn main() -> Result<()> {
tracing_subscriber::fmt::init();
let schema = failure_schema();
let failure_tool = AgentCanFail::with_parameters_schema(schema.clone());
println!(
"task_failed tool schema:\n{}",
to_string_pretty(&failure_tool.tool_spec())?,
);
let openai = swiftide::integrations::openai::OpenAI::builder()
.default_prompt_model("gpt-4o-mini")
.default_embed_model("text-embedding-3-small")
.build()?;
let mut builder = Agent::builder();
builder
.llm(&openai)
.tools([failure_tool.clone()])
.on_stop(|_, reason, _| {
Box::pin(async move {
if let StopReason::AgentFailed(Some(payload)) = reason {
let json = to_string_pretty(&payload).unwrap();
println!("agent reported failure:\n{json}");
}
Ok(())
})
});
if let Some(prompt) = builder.system_prompt_mut() {
prompt
.with_role("Incident response coordinator")
.with_guidelines([
"If the task cannot be completed, call the `task_failed` tool using the provided JSON schema.",
"Populate all required fields and list at least one `recommended_actions` entry.",
"Clearly document the impact so downstream teams can prioritize remediation.",
])
.with_constraints(["Do not claim success when blockers remain unresolved."]);
}
let mut agent = builder.build()?;
agent
.query_once(
"You must restore last night's database backup, but the only backup file is corrupted and no redundant copy exists. Report the failure.",
)
.await?;
Ok(())
}
================================================
FILE: examples/agents_mcp_tools.rs
================================================
//! This is an example of how to build a Swiftide agent with tools using the MCP protocol.
//!
//! The agent in this example prints all messages using a channel.
use anyhow::Result;
use rmcp::{
ServiceExt as _,
model::{ClientInfo, Implementation},
transport::{ConfigureCommandExt as _, TokioChildProcess},
};
use swiftide::agents::{self, tools::mcp::McpToolbox};
#[tokio::main]
async fn main() -> Result<()> {
println!("Hello, agents!");
let openai = swiftide::integrations::openai::OpenAI::builder()
.default_embed_model("text-embeddings-3-small")
.default_prompt_model("gpt-4o-mini")
.build()?;
let (tx, mut rx) = tokio::sync::mpsc::unbounded_channel::<String>();
tokio::spawn(async move {
while let Some(msg) = rx.recv().await {
println!("{msg}");
}
});
// First set up our client info to identify ourselves to the server
let client_info = ClientInfo {
client_info: Implementation {
name: "swiftide-example".into(),
version: env!("CARGO_PKG_VERSION").into(),
title: None,
description: None,
icons: None,
website_url: None,
},
..Default::default()
};
// Use `rmcp` to start the server
let running_service = client_info
.serve(TokioChildProcess::new(
tokio::process::Command::new("npx").configure(|cmd| {
cmd.args(["-y", "@modelcontextprotocol/server-everything"]);
}),
)?)
.await?;
// Create a toolbox from the running server, and only use the `add` tool
//
// A toolbox reveals it's tools to the swiftide agent the first time it starts (if the state of
// the agent was pending). You can add as many toolboxes as you want. MCP services are an
// implmenentation of a toolbox. A list of tools is another.
let everything_toolbox = McpToolbox::from_running_service(running_service)
.with_whitelist(["add"])
.to_owned();
agents::Agent::builder()
.llm(&openai)
// Add the toolbox to the agent
.add_toolbox(everything_toolbox)
// Every message added by the agent will be printed to stdout
.on_new_message(move |_, msg| {
let msg = msg.to_string();
let tx = tx.clone();
Box::pin(async move {
tx.send(msg).unwrap();
Ok(())
})
})
.build()?
.query("Use the add tool to add 1 and 2")
.await?;
Ok(())
}
================================================
FILE: examples/agents_resume.rs
================================================
//! This example illustrates how to resume an agent from existing messages.
use anyhow::Result;
use swiftide::agents::{self, DefaultContext};
#[tokio::main]
async fn main() -> Result<()> {
println!("Hello, agents!");
let openai = swiftide::integrations::openai::OpenAI::builder()
.default_embed_model("text-embeddings-3-small")
.default_prompt_model("gpt-4o-mini")
.build()?;
let mut first_agent = agents::Agent::builder().llm(&openai).build()?;
first_agent.query("Say hello!").await?;
// Let's store the messages in a database, retrieve them back, and start a new agent
let stored_history = serde_json::to_string(&first_agent.history().await?)?;
let retrieved_history: Vec<_> = serde_json::from_str(&stored_history)?;
let restored_context = DefaultContext::default()
.with_existing_messages(retrieved_history)
.await?
.to_owned();
let mut second_agent = agents::Agent::builder()
.llm(&openai)
.context(restored_context)
// We'll use the one from the first agent, alternatively we could also pop it from the
// previous history and add a new one here
.no_system_prompt()
.build()?;
second_agent.query("What did you say?").await?;
Ok(())
}
================================================
FILE: examples/agents_with_human_in_the_loop.rs
================================================
//! This is an example of using a human in the loop pattern with switfide agents.
//!
//! In the example we send the tool call over an channel, and then manually approve it.
//!
//! In a more realistic example, you can use other rust primitives to make it work for your
//! usecase. I.e., make an api request with a callback url that will add the feedback.
//!
//! Both requesting feedback and providing feedback support an optional payload (as a
//! `serde_json::Value`).
//!
//! This allows for more custom workflows, to either display or provide more input to the
//! underlying tool call.
//!
//! For an example on how to implement your own custom wrappers, refer to
//! `tools::control::ApprovalRequired`
use anyhow::Result;
use swiftide::{
agents::{self, StopReason, tools::control::ApprovalRequired},
chat_completion::{ToolOutput, errors::ToolError},
traits::{AgentContext, ToolFeedback},
};
use tracing_subscriber::EnvFilter;
#[swiftide::tool(
description = "Guess a number",
param(name = "number", description = "Number to guess")
)]
async fn guess_a_number(
_context: &dyn AgentContext,
number: usize,
) -> Result<ToolOutput, ToolError> {
let actual_number = 42;
if number == actual_number {
Ok("You guessed it!".into())
} else {
Ok("Try again!".into())
}
}
#[tokio::main]
async fn main() -> Result<()> {
tracing_subscriber::fmt()
.compact()
.with_env_filter(EnvFilter::from_default_env())
.init();
println!("Hello, agents!");
let openai = swiftide::integrations::openai::OpenAI::builder()
.default_prompt_model("gpt-4o")
.build()?;
// ApprovalRequired is a simple wrapper. You can also implement your own approval
// flows by returning a `ToolOutput::FeedbackRequired` in a tool,
// you can then use `has_received_feedback` and `received_feedback` on the context
// to build your custom workflow.
let guess_with_approval = ApprovalRequired::new(guess_a_number());
let mut agent = agents::Agent::builder()
.llm(&openai)
.tools(vec![guess_with_approval])
// Every message added by the agent will be printed to stdout
.on_new_message(move |_, msg| {
println!("{msg}");
Box::pin(async move { Ok(()) })
})
.limit(5)
.build()?;
// First query the agent, the agent will stop with a reason that feedback is required
agent
.query("Guess a number between 0 and 100 using the `guess_a_number` tool")
.await?;
// The agent stopped, lets get the tool call
let Some(StopReason::FeedbackRequired { tool_call, .. }) = agent.stop_reason() else {
panic!("expected a tool call to approve")
};
// Alternatively, you can also get the stop reason from the agent state
// agent.state().stop_reason().unwrap().feedback_required().unwrap()
// R
gitextract_d7f6_hv1/ ├── .github/ │ ├── ISSUE_TEMPLATE/ │ │ ├── bug_report.md │ │ └── feature_request.md │ ├── dependabot.yml │ └── workflows/ │ ├── bench.yml │ ├── coverage.yml │ ├── discord.yml │ ├── lint.yml │ ├── pr.yml │ ├── release.yml │ └── test.yml ├── .gitignore ├── .markdownlint.yaml ├── AGENTS.md ├── CHANGELOG.md ├── CONTRIBUTING.md ├── Cargo.toml ├── LICENSE ├── README.md ├── benchmarks/ │ ├── Cargo.toml │ ├── fileloader.rs │ ├── local_pipeline.rs │ ├── node_cache_comparison.rs │ └── output.txt ├── cliff.toml ├── deny.toml ├── examples/ │ ├── Cargo.toml │ ├── agent_can_fail_custom_schema.rs │ ├── agents_mcp_tools.rs │ ├── agents_resume.rs │ ├── agents_with_human_in_the_loop.rs │ ├── aws_bedrock.rs │ ├── aws_bedrock_agent.rs │ ├── dashscope.rs │ ├── describe_image.rs │ ├── fastembed.rs │ ├── fluvio.rs │ ├── hello_agents.rs │ ├── hybrid_search.rs │ ├── index_codebase.rs │ ├── index_codebase_reduced_context.rs │ ├── index_groq.rs │ ├── index_into_redis.rs │ ├── index_markdown_lots_of_metadata.rs │ ├── index_md_into_pgvector.rs │ ├── index_ollama.rs │ ├── kafka.rs │ ├── lancedb.rs │ ├── langfuse.rs │ ├── query_pipeline.rs │ ├── reranking.rs │ ├── responses_api.rs │ ├── responses_api_reasoning.rs │ ├── scraping_index_to_markdown.rs │ ├── stop_with_args_custom_schema.rs │ ├── store_multiple_vectors.rs │ ├── streaming_agents.rs │ ├── structured_prompt.rs │ ├── tasks.rs │ ├── tool_custom_schema.rs │ └── usage_metrics.rs ├── release-plz.toml ├── renovate.json ├── rust-toolchain.toml ├── rustfmt.toml ├── swiftide/ │ ├── Cargo.toml │ ├── build.rs │ ├── src/ │ │ ├── lib.rs │ │ └── test_utils.rs │ └── tests/ │ ├── dyn_traits.rs │ ├── indexing_pipeline.rs │ ├── lancedb.rs │ ├── pgvector.rs │ ├── query_pipeline.rs │ └── sparse_embeddings_and_hybrid_search.rs ├── swiftide-agents/ │ ├── Cargo.toml │ └── src/ │ ├── agent.rs │ ├── default_context.rs │ ├── errors.rs │ ├── hooks.rs │ ├── lib.rs │ ├── snapshots/ │ │ ├── swiftide_agents__system_prompt__tests__customization.snap │ │ └── swiftide_agents__system_prompt__tests__to_prompt.snap │ ├── state.rs │ ├── system_prompt.rs │ ├── system_prompt_template.md │ ├── tasks/ │ │ ├── closures.rs │ │ ├── errors.rs │ │ ├── impls.rs │ │ ├── mod.rs │ │ ├── node.rs │ │ ├── task.rs │ │ └── transition.rs │ ├── test_utils.rs │ ├── tools/ │ │ ├── arg_preprocessor.rs │ │ ├── control.rs │ │ ├── local_executor.rs │ │ ├── mcp.rs │ │ └── mod.rs │ └── util.rs ├── swiftide-core/ │ ├── Cargo.toml │ ├── README.md │ └── src/ │ ├── agent_traits.rs │ ├── chat_completion/ │ │ ├── chat_completion_request.rs │ │ ├── chat_completion_response.rs │ │ ├── chat_message.rs │ │ ├── errors.rs │ │ ├── mod.rs │ │ ├── tool_schema.rs │ │ ├── tools.rs │ │ └── traits.rs │ ├── document.rs │ ├── indexing_decorators.rs │ ├── indexing_defaults.rs │ ├── indexing_stream.rs │ ├── indexing_traits.rs │ ├── lib.rs │ ├── metadata.rs │ ├── metrics.rs │ ├── node.rs │ ├── prelude.rs │ ├── prompt.rs │ ├── query.rs │ ├── query_evaluation.rs │ ├── query_stream.rs │ ├── query_traits.rs │ ├── search_strategies/ │ │ ├── custom_strategy.rs │ │ ├── hybrid_search.rs │ │ ├── mod.rs │ │ └── similarity_single_embedding.rs │ ├── statistics.rs │ ├── stream_backoff.rs │ ├── test_utils.rs │ ├── token_estimation.rs │ ├── type_aliases.rs │ └── util.rs ├── swiftide-indexing/ │ ├── Cargo.toml │ └── src/ │ ├── lib.rs │ ├── loaders/ │ │ ├── file_loader.rs │ │ └── mod.rs │ ├── persist/ │ │ ├── memory_storage.rs │ │ └── mod.rs │ ├── pipeline.rs │ └── transformers/ │ ├── chunk_markdown.rs │ ├── chunk_text.rs │ ├── embed.rs │ ├── metadata_keywords.rs │ ├── metadata_qa_text.rs │ ├── metadata_summary.rs │ ├── metadata_title.rs │ ├── mod.rs │ ├── prompts/ │ │ ├── metadata_keywords.prompt.md │ │ ├── metadata_qa_text.prompt.md │ │ ├── metadata_summary.prompt.md │ │ └── metadata_title.prompt.md │ ├── snapshots/ │ │ ├── swiftide_indexing__transformers__compress_code_outline__test__compress_code_template.snap │ │ ├── swiftide_indexing__transformers__metadata_keywords__test__template.snap │ │ ├── swiftide_indexing__transformers__metadata_qa_code__test__template.snap │ │ ├── swiftide_indexing__transformers__metadata_qa_code__test__template_with_outline.snap │ │ ├── swiftide_indexing__transformers__metadata_qa_text__test__template.snap │ │ ├── swiftide_indexing__transformers__metadata_summary__test__template.snap │ │ └── swiftide_indexing__transformers__metadata_title__test__template.snap │ └── sparse_embed.rs ├── swiftide-integrations/ │ ├── Cargo.toml │ └── src/ │ ├── anthropic/ │ │ ├── chat_completion.rs │ │ ├── mod.rs │ │ ├── simple_prompt.rs │ │ └── tool_schema.rs │ ├── aws_bedrock_v2/ │ │ ├── chat_completion.rs │ │ ├── mod.rs │ │ ├── simple_prompt.rs │ │ ├── structured_prompt.rs │ │ ├── test_utils.rs │ │ └── tool_schema.rs │ ├── dashscope/ │ │ ├── config.rs │ │ └── mod.rs │ ├── duckdb/ │ │ ├── extensions.sql │ │ ├── hybrid_query.sql │ │ ├── mod.rs │ │ ├── node_cache.rs │ │ ├── persist.rs │ │ ├── retrieve.rs │ │ ├── schema.sql │ │ └── upsert.sql │ ├── fastembed/ │ │ ├── embedding_model.rs │ │ ├── mod.rs │ │ ├── rerank.rs │ │ └── sparse_embedding_model.rs │ ├── fluvio/ │ │ ├── loader.rs │ │ └── mod.rs │ ├── gemini/ │ │ ├── config.rs │ │ └── mod.rs │ ├── groq/ │ │ ├── config.rs │ │ └── mod.rs │ ├── kafka/ │ │ ├── loader.rs │ │ ├── mod.rs │ │ └── persist.rs │ ├── lancedb/ │ │ ├── connection_pool.rs │ │ ├── mod.rs │ │ ├── persist.rs │ │ └── retrieve.rs │ ├── lib.rs │ ├── ollama/ │ │ ├── config.rs │ │ └── mod.rs │ ├── open_router/ │ │ ├── config.rs │ │ └── mod.rs │ ├── openai/ │ │ ├── chat_completion.rs │ │ ├── embed.rs │ │ ├── mod.rs │ │ ├── responses_api.rs │ │ ├── simple_prompt.rs │ │ ├── structured_prompt.rs │ │ └── tool_schema.rs │ ├── parquet/ │ │ ├── loader.rs │ │ ├── mod.rs │ │ └── test.parquet │ ├── pgvector/ │ │ ├── fixtures.rs │ │ ├── mod.rs │ │ ├── persist.rs │ │ ├── pgv_table_types.rs │ │ └── retrieve.rs │ ├── qdrant/ │ │ ├── indexing_node.rs │ │ ├── mod.rs │ │ ├── persist.rs │ │ └── retrieve.rs │ ├── redb/ │ │ ├── mod.rs │ │ └── node_cache.rs │ ├── redis/ │ │ ├── message_history.rs │ │ ├── mod.rs │ │ ├── node_cache.rs │ │ └── persist.rs │ ├── scraping/ │ │ ├── html_to_markdown_transformer.rs │ │ ├── loader.rs │ │ └── mod.rs │ ├── tiktoken/ │ │ └── mod.rs │ └── treesitter/ │ ├── chunk_code.rs │ ├── code_tree.rs │ ├── compress_code_outline.rs │ ├── metadata_qa_code.rs │ ├── metadata_refs_defs_code.rs │ ├── mod.rs │ ├── outline_code_tree_sitter.rs │ ├── outliner.rs │ ├── prompts/ │ │ ├── compress_code_outline.prompt.md │ │ └── metadata_qa_code.prompt.md │ ├── queries.rs │ ├── snapshots/ │ │ ├── swiftide_integrations__treesitter__compress_code_outline__test__compress_code_template.snap │ │ ├── swiftide_integrations__treesitter__metadata_qa_code__test__default_prompt.snap │ │ └── swiftide_integrations__treesitter__metadata_qa_code__test__template_with_outline.snap │ ├── splitter.rs │ └── supported_languages.rs ├── swiftide-langfuse/ │ ├── Cargo.toml │ ├── src/ │ │ ├── apis/ │ │ │ ├── configuration.rs │ │ │ ├── ingestion_api.rs │ │ │ └── mod.rs │ │ ├── langfuse_batch_manager.rs │ │ ├── lib.rs │ │ ├── models/ │ │ │ ├── create_event_body.rs │ │ │ ├── create_generation_body.rs │ │ │ ├── create_score_value.rs │ │ │ ├── create_span_body.rs │ │ │ ├── ingestion_batch_request.rs │ │ │ ├── ingestion_error.rs │ │ │ ├── ingestion_event.rs │ │ │ ├── ingestion_event_one_of.rs │ │ │ ├── ingestion_event_one_of_1.rs │ │ │ ├── ingestion_event_one_of_2.rs │ │ │ ├── ingestion_event_one_of_3.rs │ │ │ ├── ingestion_event_one_of_4.rs │ │ │ ├── ingestion_event_one_of_5.rs │ │ │ ├── ingestion_event_one_of_6.rs │ │ │ ├── ingestion_event_one_of_7.rs │ │ │ ├── ingestion_event_one_of_8.rs │ │ │ ├── ingestion_event_one_of_9.rs │ │ │ ├── ingestion_response.rs │ │ │ ├── ingestion_success.rs │ │ │ ├── ingestion_usage.rs │ │ │ ├── map_value.rs │ │ │ ├── mod.rs │ │ │ ├── model_usage_unit.rs │ │ │ ├── observation_body.rs │ │ │ ├── observation_level.rs │ │ │ ├── observation_type.rs │ │ │ ├── open_ai_completion_usage_schema.rs │ │ │ ├── open_ai_response_usage_schema.rs │ │ │ ├── open_ai_usage.rs │ │ │ ├── optional_observation_body.rs │ │ │ ├── score_body.rs │ │ │ ├── score_data_type.rs │ │ │ ├── sdk_log_body.rs │ │ │ ├── trace_body.rs │ │ │ ├── update_generation_body.rs │ │ │ ├── update_span_body.rs │ │ │ ├── usage.rs │ │ │ └── usage_details.rs │ │ └── tracing_layer.rs │ └── tests/ │ ├── full_flow.rs │ └── snapshots/ │ └── full_flow__integration_tracing_layer_sends_to_langfuse.snap ├── swiftide-macros/ │ ├── Cargo.toml │ ├── src/ │ │ ├── indexing_transformer.rs │ │ ├── lib.rs │ │ ├── test_utils.rs │ │ └── tool/ │ │ ├── args.rs │ │ ├── mod.rs │ │ ├── snapshots/ │ │ │ ├── swiftide_macros__tool__tests__simple_tool.snap │ │ │ ├── swiftide_macros__tool__tests__snapshot_derive.snap │ │ │ ├── swiftide_macros__tool__tests__snapshot_derive_with_args.snap │ │ │ ├── swiftide_macros__tool__tests__snapshot_derive_with_generics.snap │ │ │ ├── swiftide_macros__tool__tests__snapshot_derive_with_lifetime.snap │ │ │ ├── swiftide_macros__tool__tests__snapshot_derive_with_option.snap │ │ │ ├── swiftide_macros__tool__tests__snapshot_multiple_args.snap │ │ │ ├── swiftide_macros__tool__tests__snapshot_single_arg.snap │ │ │ └── swiftide_macros__tool__tests__snapshot_single_arg_option.snap │ │ ├── tool_spec.rs │ │ └── wrapped.rs │ └── tests/ │ ├── tool/ │ │ ├── tool_derive_missing_description.rs │ │ ├── tool_derive_missing_description.stderr │ │ ├── tool_derive_pass.rs │ │ ├── tool_derive_vec_argument_pass.rs │ │ ├── tool_missing_arg_fail.rs │ │ ├── tool_missing_arg_fail.stderr │ │ ├── tool_missing_parameter_fail.rs │ │ ├── tool_missing_parameter_fail.stderr │ │ ├── tool_multiple_arguments_pass.rs │ │ ├── tool_no_argument_pass.rs │ │ ├── tool_object_argument_pass.rs │ │ └── tool_single_argument_pass.rs │ └── tool.rs ├── swiftide-query/ │ ├── Cargo.toml │ └── src/ │ ├── answers/ │ │ ├── mod.rs │ │ ├── simple.rs │ │ └── snapshots/ │ │ ├── swiftide_query__answers__simple__test__custom_document_template.snap │ │ ├── swiftide_query__answers__simple__test__default_prompt.snap │ │ └── swiftide_query__answers__simple__test__uses_current_if_present.snap │ ├── evaluators/ │ │ ├── mod.rs │ │ └── ragas.rs │ ├── lib.rs │ ├── query/ │ │ ├── mod.rs │ │ └── pipeline.rs │ ├── query_transformers/ │ │ ├── embed.rs │ │ ├── generate_subquestions.rs │ │ ├── mod.rs │ │ ├── snapshots/ │ │ │ └── swiftide_query__query_transformers__generate_subquestions__test__default_prompt.snap │ │ └── sparse_embed.rs │ └── response_transformers/ │ ├── mod.rs │ ├── snapshots/ │ │ └── swiftide_query__response_transformers__summary__test__default_prompt.snap │ └── summary.rs ├── swiftide-test-utils/ │ ├── Cargo.toml │ └── src/ │ ├── lib.rs │ └── test_utils.rs └── typos.toml
Showing preview only (245K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (2779 symbols across 247 files)
FILE: benchmarks/fileloader.rs
function run_fileloader (line 8) | async fn run_fileloader(num_files: usize) -> Result<usize> {
function criterion_benchmark (line 22) | fn criterion_benchmark(c: &mut Criterion) {
FILE: benchmarks/local_pipeline.rs
function run_pipeline (line 11) | async fn run_pipeline() -> Result<()> {
function criterion_benchmark (line 20) | fn criterion_benchmark(c: &mut Criterion) {
FILE: benchmarks/node_cache_comparison.rs
function run_pipeline (line 16) | async fn run_pipeline(node_cache: Box<dyn NodeCache<Input = String>>) ->...
function criterion_benchmark (line 25) | fn criterion_benchmark(c: &mut Criterion) {
function start_redis (line 65) | fn start_redis() -> Container<GenericImage> {
FILE: examples/agent_can_fail_custom_schema.rs
type FailureCategory (line 17) | enum FailureCategory {
type RemediationStatus (line 25) | enum RemediationStatus {
type FailureReport (line 33) | struct FailureReport {
function failure_schema (line 43) | fn failure_schema() -> Schema {
function main (line 48) | async fn main() -> Result<()> {
FILE: examples/agents_mcp_tools.rs
function main (line 13) | async fn main() -> Result<()> {
FILE: examples/agents_resume.rs
function main (line 6) | async fn main() -> Result<()> {
FILE: examples/agents_with_human_in_the_loop.rs
function guess_a_number (line 29) | async fn guess_a_number(
function main (line 43) | async fn main() -> Result<()> {
FILE: examples/aws_bedrock.rs
function main (line 22) | async fn main() -> Result<(), Box<dyn std::error::Error>> {
FILE: examples/aws_bedrock_agent.rs
type FormatTimestampRequest (line 23) | struct FormatTimestampRequest {
function current_utc_time (line 31) | async fn current_utc_time(context: &dyn AgentContext) -> Result<ToolOutp...
function format_timestamp (line 44) | async fn format_timestamp(
function main (line 55) | async fn main() -> Result<()> {
FILE: examples/dashscope.rs
function main (line 18) | async fn main() -> anyhow::Result<()> {
FILE: examples/describe_image.rs
function main (line 11) | async fn main() -> Result<()> {
FILE: examples/fastembed.rs
function main (line 21) | async fn main() -> Result<(), Box<dyn std::error::Error>> {
FILE: examples/fluvio.rs
function main (line 32) | async fn main() -> Result<(), Box<dyn std::error::Error>> {
FILE: examples/hello_agents.rs
type CodeSearchRequest (line 30) | struct CodeSearchRequest {
function search_code (line 43) | async fn search_code(
constant READ_FILE (line 64) | const READ_FILE: &str = "Read a file";
function read_file (line 70) | async fn read_file(context: &dyn AgentContext, path: &str) -> Result<Too...
function guess_a_number (line 87) | async fn guess_a_number(
function main (line 101) | async fn main() -> Result<()> {
FILE: examples/hybrid_search.rs
function main (line 19) | async fn main() -> Result<(), Box<dyn std::error::Error>> {
FILE: examples/index_codebase.rs
function main (line 31) | async fn main() -> Result<(), Box<dyn std::error::Error>> {
FILE: examples/index_codebase_reduced_context.rs
function main (line 32) | async fn main() -> Result<(), Box<dyn std::error::Error>> {
FILE: examples/index_groq.rs
function main (line 25) | async fn main() -> Result<(), Box<dyn std::error::Error>> {
FILE: examples/index_into_redis.rs
function main (line 28) | async fn main() -> Result<(), Box<dyn std::error::Error>> {
FILE: examples/index_markdown_lots_of_metadata.rs
function main (line 28) | async fn main() -> Result<(), Box<dyn std::error::Error>> {
FILE: examples/index_md_into_pgvector.rs
function ask_query (line 16) | async fn ask_query(
function main (line 52) | async fn main() -> Result<(), Box<dyn std::error::Error>> {
FILE: examples/index_ollama.rs
function main (line 26) | async fn main() -> Result<(), Box<dyn std::error::Error>> {
FILE: examples/kafka.rs
function main (line 23) | async fn main() -> Result<(), Box<dyn std::error::Error>> {
FILE: examples/lancedb.rs
function main (line 16) | async fn main() -> Result<(), Box<dyn std::error::Error>> {
FILE: examples/langfuse.rs
function main (line 24) | async fn main() -> Result<()> {
function prompt_openai (line 48) | async fn prompt_openai() -> Result<()> {
FILE: examples/query_pipeline.rs
function main (line 12) | async fn main() -> Result<(), Box<dyn std::error::Error>> {
FILE: examples/reranking.rs
function main (line 21) | async fn main() -> Result<(), Box<dyn std::error::Error>> {
FILE: examples/responses_api.rs
type WeatherSummary (line 16) | struct WeatherSummary {
type EchoArgs (line 22) | struct EchoArgs {
function echo_tool (line 33) | async fn echo_tool(
function main (line 41) | async fn main() -> Result<()> {
FILE: examples/responses_api_reasoning.rs
function reasoning_summary (line 9) | fn reasoning_summary(reasoning: Option<&[ReasoningItem]>) -> Option<Stri...
function main (line 26) | async fn main() -> Result<()> {
FILE: examples/scraping_index_to_markdown.rs
function main (line 22) | async fn main() -> Result<(), Box<dyn std::error::Error>> {
FILE: examples/stop_with_args_custom_schema.rs
type TaskStatus (line 16) | enum TaskStatus {
type StopPayload (line 24) | struct StopPayload {
function stop_schema (line 31) | fn stop_schema() -> Schema {
function main (line 36) | async fn main() -> Result<()> {
FILE: examples/store_multiple_vectors.rs
function main (line 34) | async fn main() -> Result<(), Box<dyn std::error::Error>> {
FILE: examples/streaming_agents.rs
function main (line 9) | async fn main() -> Result<()> {
FILE: examples/structured_prompt.rs
function main (line 7) | async fn main() -> Result<()> {
FILE: examples/tasks.rs
function main (line 26) | async fn main() -> Result<()> {
FILE: examples/tool_custom_schema.rs
type WorkflowTool (line 11) | struct WorkflowTool;
type WorkflowInstruction (line 19) | struct WorkflowInstruction {
type WorkflowAction (line 29) | enum WorkflowAction {
method invoke (line 37) | async fn invoke(
method name (line 47) | fn name<'tool>(&'tool self) -> Cow<'tool, str> {
method tool_spec (line 51) | fn tool_spec(&self) -> ToolSpec {
function workflow_schema (line 61) | fn workflow_schema() -> Schema {
function main (line 65) | fn main() -> Result<()> {
FILE: examples/usage_metrics.rs
function main (line 25) | async fn main() -> Result<(), Box<dyn std::error::Error>> {
type PrintHandle (line 87) | struct PrintHandle(Key);
method increment (line 90) | fn increment(&self, value: u64) {
method absolute (line 94) | fn absolute(&self, value: u64) {
method increment (line 100) | fn increment(&self, value: f64) {
method decrement (line 104) | fn decrement(&self, value: f64) {
method set (line 108) | fn set(&self, value: f64) {
method record (line 114) | fn record(&self, value: f64) {
type PrintRecorder (line 120) | struct PrintRecorder;
method describe_counter (line 123) | fn describe_counter(&self, key_name: KeyName, unit: Option<Unit>, descri...
method describe_gauge (line 132) | fn describe_gauge(&self, key_name: KeyName, unit: Option<Unit>, descript...
method describe_histogram (line 141) | fn describe_histogram(&self, key_name: KeyName, unit: Option<Unit>, desc...
method register_counter (line 150) | fn register_counter(&self, key: &Key, _metadata: &Metadata<'_>) -> Count...
method register_gauge (line 154) | fn register_gauge(&self, key: &Key, _metadata: &Metadata<'_>) -> Gauge {
method register_histogram (line 158) | fn register_histogram(&self, key: &Key, _metadata: &Metadata<'_>) -> His...
function init_print_logger (line 163) | fn init_print_logger() {
FILE: swiftide-agents/src/agent.rs
type Agent (line 46) | pub struct Agent {
method fmt (line 162) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method builder (line 349) | pub fn builder() -> AgentBuilder {
method name (line 356) | pub fn name(&self) -> &str {
method default_tools (line 362) | pub fn default_tools() -> HashSet<Box<dyn Tool>> {
method query (line 373) | pub async fn query(&mut self, query: impl Into<Prompt>) -> Result<(), ...
method add_tool (line 382) | pub fn add_tool(&mut self, tool: Box<dyn Tool>) {
method tools_mut (line 392) | pub fn tools_mut(&mut self) -> &mut HashSet<Box<dyn Tool>> {
method query_once (line 402) | pub async fn query_once(&mut self, query: impl Into<Prompt>) -> Result...
method run (line 413) | pub async fn run(&mut self) -> Result<(), AgentError> {
method run_once (line 424) | pub async fn run_once(&mut self) -> Result<(), AgentError> {
method history (line 434) | pub async fn history(&self) -> Result<Vec<ChatMessage>, AgentError> {
method run_agent (line 441) | pub(crate) async fn run_agent(
method step (line 547) | async fn step(
method invoke_tools (line 649) | async fn invoke_tools(&mut self, tool_calls: &[ToolCall]) -> Result<()...
method hooks_by_type (line 741) | fn hooks_by_type(&self, hook_type: HookTypes) -> Vec<&Hook> {
method find_tool_by_name (line 748) | fn find_tool_by_name(&self, tool_name: &str) -> Option<Box<dyn Tool>> {
method handle_control_tools (line 756) | async fn handle_control_tools(&mut self, tool_call: &ToolCall, output:...
method system_prompt (line 783) | pub fn system_prompt(&self) -> Option<&SystemPrompt> {
method system_prompt_mut (line 790) | pub fn system_prompt_mut(&mut self) -> Option<&mut SystemPrompt> {
method tool_calls_over_limit (line 794) | fn tool_calls_over_limit(&mut self, tool_call: &ToolCall) -> bool {
method add_message (line 820) | pub async fn add_message(&self, mut message: ChatMessage) -> Result<()...
method stop (line 831) | pub async fn stop(&mut self, reason: impl Into<StopReason>) {
method stop_with_error (line 846) | pub async fn stop_with_error(&mut self, error: &AgentError) {
method context (line 856) | pub fn context(&self) -> &dyn AgentContext {
method is_running (line 861) | pub fn is_running(&self) -> bool {
method is_stopped (line 866) | pub fn is_stopped(&self) -> bool {
method is_pending (line 871) | pub fn is_pending(&self) -> bool {
method tools (line 876) | pub fn tools(&self) -> &HashSet<Box<dyn Tool>> {
method state (line 880) | pub fn state(&self) -> &state::State {
method stop_reason (line 884) | pub fn stop_reason(&self) -> Option<&StopReason> {
method has_unfulfilled_tool_calls (line 888) | async fn has_unfulfilled_tool_calls(&self) -> Result<bool, AgentError> {
method invoke_pending_tool_calls (line 897) | async fn invoke_pending_tool_calls(&mut self) -> Result<(), AgentError> {
method flush_pending_user_messages (line 917) | async fn flush_pending_user_messages(&mut self) -> Result<(), AgentErr...
method load_toolboxes (line 935) | async fn load_toolboxes(&mut self) -> Result<(), AgentError> {
method clone (line 141) | fn clone(&self) -> Self {
method context (line 190) | pub fn context(&mut self, context: impl AgentContext + 'static) -> &mut ...
method system_prompt_mut (line 199) | pub fn system_prompt_mut(&mut self) -> Option<&mut SystemPrompt> {
method no_system_prompt (line 204) | pub fn no_system_prompt(&mut self) -> &mut Self {
method add_hook (line 211) | pub fn add_hook(&mut self, hook: Hook) -> &mut Self {
method add_tool (line 219) | pub fn add_tool(&mut self, tool: impl Tool + 'static) -> &mut Self {
method before_all (line 230) | pub fn before_all(&mut self, hook: impl BeforeAllFn + 'static) -> &mut S...
method on_start (line 237) | pub fn on_start(&mut self, hook: impl OnStartFn + 'static) -> &mut Self {
method on_stream (line 247) | pub fn on_stream(&mut self, hook: impl OnStreamFn + 'static) -> &mut Self {
method before_completion (line 253) | pub fn before_completion(&mut self, hook: impl BeforeCompletionFn + 'sta...
method after_tool (line 262) | pub fn after_tool(&mut self, hook: impl AfterToolFn + 'static) -> &mut S...
method before_tool (line 267) | pub fn before_tool(&mut self, hook: impl BeforeToolFn + 'static) -> &mut...
method after_completion (line 272) | pub fn after_completion(&mut self, hook: impl AfterCompletionFn + 'stati...
method after_each (line 278) | pub fn after_each(&mut self, hook: impl AfterEachFn + 'static) -> &mut S...
method on_new_message (line 284) | pub fn on_new_message(&mut self, hook: impl MessageHookFn + 'static) -> ...
method on_stop (line 288) | pub fn on_stop(&mut self, hook: impl OnStopFn + 'static) -> &mut Self {
method llm (line 293) | pub fn llm<LLM: ChatCompletion + Clone + 'static>(&mut self, llm: &LLM) ...
method without_default_stop_tool (line 304) | pub fn without_default_stop_tool(&mut self) -> &mut Self {
method builder_default_tools (line 309) | fn builder_default_tools(&self) -> HashSet<Box<dyn Tool>> {
method tools (line 321) | pub fn tools<TOOL, I: IntoIterator<Item = TOOL>>(&mut self, tools: I) ->...
method add_toolbox (line 339) | pub fn add_toolbox(&mut self, toolbox: impl ToolBox + 'static) -> &mut S...
function maybe_tool_call_without_output (line 950) | fn maybe_tool_call_without_output(messages: &[ChatMessage]) -> Option<&C...
function test_agent_builder_defaults (line 986) | async fn test_agent_builder_defaults() {
function test_agent_tool_calling_loop (line 1022) | async fn test_agent_tool_calling_loop() {
function test_agent_tool_run_once (line 1068) | async fn test_agent_tool_run_once() {
function test_agent_tool_via_toolbox_run_once (line 1100) | async fn test_agent_tool_via_toolbox_run_once() {
function test_multiple_tool_calls (line 1132) | async fn test_multiple_tool_calls() {
function test_agent_state_machine (line 1189) | async fn test_agent_state_machine() {
function test_summary (line 1218) | async fn test_summary() {
function test_agent_hooks (line 1279) | async fn test_agent_hooks() {
function test_agent_loop_limit (line 1348) | async fn test_agent_loop_limit() {
function test_tool_retry_mechanism (line 1395) | async fn test_tool_retry_mechanism() {
function test_streaming (line 1455) | async fn test_streaming() {
function test_recovering_agent_existing_history (line 1491) | async fn test_recovering_agent_existing_history() {
function test_agent_with_approval_required_tool (line 1588) | async fn test_agent_with_approval_required_tool() {
function test_agent_with_approval_required_tool_denied (line 1662) | async fn test_agent_with_approval_required_tool_denied() {
function test_defers_user_message_until_pending_tool_calls_complete (line 1747) | async fn test_defers_user_message_until_pending_tool_calls_complete() {
function test_removing_default_stop_tool (line 1785) | async fn test_removing_default_stop_tool() {
FILE: swiftide-agents/src/default_context.rs
type DefaultContext (line 32) | pub struct DefaultContext {
method fmt (line 67) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method from_executor (line 80) | pub fn from_executor<T: Into<Arc<dyn ToolExecutor>>>(executor: T) -> D...
method with_stop_on_assistant (line 89) | pub fn with_stop_on_assistant(&mut self, stop: bool) -> &mut Self {
method with_message_history (line 94) | pub fn with_message_history(&mut self, backend: impl MessageHistory + ...
method with_existing_messages (line 108) | pub async fn with_existing_messages<I: IntoIterator<Item = ChatMessage>>(
method with_tool_feedback (line 124) | pub fn with_tool_feedback(&mut self, feedback: impl Into<HashMap<ToolC...
method default (line 54) | fn default() -> Self {
method next_completion (line 134) | async fn next_completion(&self) -> Result<Option<Vec<ChatMessage>>> {
method current_new_messages (line 175) | async fn current_new_messages(&self) -> Result<Vec<ChatMessage>> {
method history (line 187) | async fn history(&self) -> Result<Vec<ChatMessage>> {
method add_messages (line 192) | async fn add_messages(&self, messages: Vec<ChatMessage>) -> Result<()> {
method add_message (line 197) | async fn add_message(&self, item: ChatMessage) -> Result<()> {
method exec_cmd (line 202) | async fn exec_cmd(&self, cmd: &Command) -> Result<CommandOutput, Command...
method executor (line 206) | fn executor(&self) -> &Arc<dyn ToolExecutor> {
method redrive (line 214) | async fn redrive(&self) -> Result<()> {
method has_received_feedback (line 227) | async fn has_received_feedback(&self, tool_call: &ToolCall) -> Option<To...
method feedback_received (line 235) | async fn feedback_received(&self, tool_call: &ToolCall, feedback: &ToolF...
method replace_history (line 250) | async fn replace_history(&self, items: Vec<ChatMessage>) -> Result<()> {
function filter_messages_since_summary (line 258) | fn filter_messages_since_summary(messages: Vec<ChatMessage>) -> Vec<Chat...
function test_iteration_tracking (line 287) | async fn test_iteration_tracking() {
function test_should_complete_after_tool_call (line 326) | async fn test_should_complete_after_tool_call() {
function test_filters_messages_before_summary (line 357) | async fn test_filters_messages_before_summary() {
function test_filters_messages_before_summary_with_assistant_last (line 386) | async fn test_filters_messages_before_summary_with_assistant_last() {
function test_redrive (line 456) | async fn test_redrive() {
function test_next_completion_empty_history (line 531) | async fn test_next_completion_empty_history() {
function test_next_completion_out_of_bounds_ptr (line 538) | async fn test_next_completion_out_of_bounds_ptr() {
function test_replace_history_replaces_and_resets_pointers (line 562) | async fn test_replace_history_replaces_and_resets_pointers() {
FILE: swiftide-agents/src/errors.rs
type AgentError (line 9) | pub enum AgentError {
FILE: swiftide-agents/src/hooks.rs
type BeforeAllFn (line 57) | pub trait BeforeAllFn:
type AfterEachFn (line 67) | pub trait AfterEachFn:
type BeforeCompletionFn (line 77) | pub trait BeforeCompletionFn:
type AfterCompletionFn (line 90) | pub trait AfterCompletionFn:
type AfterToolFn (line 104) | pub trait AfterToolFn:
type BeforeToolFn (line 119) | pub trait BeforeToolFn:
type MessageHookFn (line 130) | pub trait MessageHookFn:
type OnStartFn (line 141) | pub trait OnStartFn:
type OnStopFn (line 152) | pub trait OnStopFn:
type OnStreamFn (line 166) | pub trait OnStreamFn:
type Hook (line 182) | pub enum Hook {
function test_hooks_compile_sync_and_async (line 310) | fn test_hooks_compile_sync_and_async() {
FILE: swiftide-agents/src/state.rs
type State (line 8) | pub enum State {
method stop_reason (line 16) | pub fn stop_reason(&self) -> Option<&StopReason> {
type StopReason (line 29) | pub enum StopReason {
method as_requested_by_tool (line 54) | pub fn as_requested_by_tool(&self) -> Option<(&ToolCall, Option<&Value...
method as_tool_calls_over_limit (line 62) | pub fn as_tool_calls_over_limit(&self) -> Option<&ToolCall> {
method as_feedback_required (line 70) | pub fn as_feedback_required(&self) -> Option<(&ToolCall, Option<&serde...
method as_error (line 78) | pub fn as_error(&self) -> Option<()> {
method as_no_new_messages (line 86) | pub fn as_no_new_messages(&self) -> Option<()> {
method as_other (line 94) | pub fn as_other(&self) -> Option<&str> {
method from (line 109) | fn from(value: S) -> Self {
method default (line 103) | fn default() -> Self {
FILE: swiftide-agents/src/system_prompt.rs
type SystemPrompt (line 23) | pub struct SystemPrompt {
method builder (line 47) | pub fn builder() -> SystemPromptBuilder {
method to_prompt (line 51) | pub fn to_prompt(&self) -> Prompt {
method with_added_guideline (line 56) | pub fn with_added_guideline(&mut self, guideline: impl AsRef<str>) -> ...
method with_added_constraint (line 62) | pub fn with_added_constraint(&mut self, constraint: impl AsRef<str>) -...
method with_guidelines (line 68) | pub fn with_guidelines<T: IntoIterator<Item = S>, S: AsRef<str>>(
method with_constraints (line 80) | pub fn with_constraints<T: IntoIterator<Item = S>, S: AsRef<str>>(
method with_role (line 92) | pub fn with_role(&mut self, role: impl Into<String>) -> &mut Self {
method with_additional (line 98) | pub fn with_additional(&mut self, additional: impl Into<String>) -> &m...
method with_template (line 104) | pub fn with_template(&mut self, template: impl Into<Prompt>) -> &mut S...
method from (line 111) | fn from(text: String) -> Self {
method from (line 123) | fn from(text: &'static str) -> Self {
method from (line 147) | fn from(prompt: Prompt) -> Self {
method into (line 218) | fn into(self) -> Prompt {
method from (line 135) | fn from(val: SystemPrompt) -> Self {
method default (line 159) | fn default() -> Self {
method add_guideline (line 171) | pub fn add_guideline(&mut self, guideline: &str) -> &mut Self {
method add_constraint (line 178) | pub fn add_constraint(&mut self, constraint: &str) -> &mut Self {
method guidelines (line 185) | pub fn guidelines<T: IntoIterator<Item = S>, S: AsRef<str>>(
method constraints (line 198) | pub fn constraints<T: IntoIterator<Item = S>, S: AsRef<str>>(
function default_prompt_template (line 212) | fn default_prompt_template() -> Prompt {
function test_customization (line 240) | async fn test_customization() {
function test_to_prompt (line 265) | async fn test_to_prompt() {
function test_system_prompt_to_builder (line 290) | async fn test_system_prompt_to_builder() {
function test_with_added_guideline_and_constraint (line 316) | fn test_with_added_guideline_and_constraint() {
function test_with_guidelines_and_constraints_overwrites (line 328) | fn test_with_guidelines_and_constraints_overwrites() {
function test_with_role_and_additional_and_template (line 344) | fn test_with_role_and_additional_and_template() {
FILE: swiftide-agents/src/tasks/closures.rs
type SyncFn (line 11) | pub struct SyncFn<F, I, O>
type AsyncFn (line 20) | pub struct AsyncFn<F, I, O>
function new (line 38) | pub fn new(f: F) -> Self {
function new (line 56) | pub fn new(f: F) -> Self {
function from (line 68) | fn from(f: F) -> Self {
function from (line 81) | fn from(f: F) -> Self {
type Input (line 93) | type Input = I;
type Output (line 94) | type Output = O;
type Error (line 95) | type Error = NodeError;
method evaluate (line 97) | async fn evaluate(
type Input (line 119) | type Input = I;
type Output (line 120) | type Output = O;
type Error (line 121) | type Error = NodeError;
method evaluate (line 123) | async fn evaluate(
FILE: swiftide-agents/src/tasks/errors.rs
type TaskError (line 6) | pub enum TaskError {
method missing_transition (line 30) | pub fn missing_transition(node_id: usize) -> Self {
method missing_node (line 34) | pub fn missing_node(node_id: usize) -> Self {
method missing_input (line 38) | pub fn missing_input(node_id: usize) -> Self {
method missing_output (line 42) | pub fn missing_output(node_id: usize) -> Self {
method type_error (line 46) | pub fn type_error<T: Any + Send>(output: &T) -> Self {
type NodeError (line 57) | pub struct NodeError {
method fmt (line 64) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method new (line 74) | pub fn new(
FILE: swiftide-agents/src/tasks/impls.rs
type TaskAgent (line 19) | pub struct TaskAgent(Arc<Mutex<Agent>>);
method from (line 22) | fn from(agent: Agent) -> Self {
type Input (line 30) | type Input = Prompt;
type Output (line 32) | type Output = ();
type Error (line 34) | type Error = AgentError;
method evaluate (line 36) | async fn evaluate(
type Input (line 49) | type Input = Prompt;
type Output (line 51) | type Output = String;
type Error (line 53) | type Error = LanguageModelError;
method evaluate (line 55) | async fn evaluate(
type Input (line 69) | type Input = Prompt;
type Output (line 71) | type Output = String;
type Error (line 73) | type Error = LanguageModelError;
method evaluate (line 75) | async fn evaluate(
type Input (line 89) | type Input = ChatCompletionRequest<'static>;
type Output (line 91) | type Output = ChatCompletionResponse;
type Error (line 93) | type Error = LanguageModelError;
method evaluate (line 95) | async fn evaluate(
type Input (line 108) | type Input = ChatCompletionRequest<'static>;
type Output (line 110) | type Output = ChatCompletionResponse;
type Error (line 112) | type Error = LanguageModelError;
method evaluate (line 114) | async fn evaluate(
type Input (line 127) | type Input = Command;
type Output (line 129) | type Output = CommandOutput;
type Error (line 131) | type Error = CommandError;
method evaluate (line 133) | async fn evaluate(
type Input (line 146) | type Input = Command;
type Output (line 148) | type Output = CommandOutput;
type Error (line 150) | type Error = CommandError;
method evaluate (line 152) | async fn evaluate(
type Input (line 168) | type Input = I;
type Output (line 170) | type Output = O;
type Error (line 172) | type Error = E;
method evaluate (line 174) | async fn evaluate(
FILE: swiftide-agents/src/tasks/node.rs
type NodeArg (line 11) | pub trait NodeArg: Send + Sync + DynClone + 'static {}
type NoopNode (line 16) | pub struct NoopNode<Context: NodeArg> {
method default (line 24) | fn default() -> Self {
type TaskNode (line 47) | pub trait TaskNode: Send + Sync + DynClone + Any {
type Output (line 33) | type Output = ();
type Input (line 34) | type Input = Context;
type Error (line 35) | type Error = NodeError;
method evaluate (line 37) | async fn evaluate(
method evaluate (line 52) | async fn evaluate(
type Input (line 79) | type Input = Input;
type Output (line 80) | type Output = Output;
type Error (line 81) | type Error = Error;
method evaluate (line 83) | async fn evaluate(
type DynNodeId (line 59) | pub type DynNodeId<T> = NodeId<
type NodeId (line 97) | pub struct NodeId<T: TaskNode + ?Sized> {
function fmt (line 103) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type AnyNodeId (line 110) | pub type AnyNodeId = usize;
function id (line 113) | pub fn id(&self) -> usize {
function as_transition (line 118) | pub fn as_transition(&self) -> impl Fn(T::Input) -> MarkedTransitionPayl...
function transitions_with (line 127) | pub fn transitions_with(&self, context: T::Input) -> MarkedTransitionPay...
function new (line 133) | pub fn new(id: usize, _node: &T) -> Self {
function as_any (line 141) | pub fn as_any(&self) -> AnyNodeId {
function as_dyn (line 145) | pub fn as_dyn(
method clone (line 156) | fn clone(&self) -> Self {
FILE: swiftide-agents/src/tasks/task.rs
type Task (line 24) | pub struct Task<Input: NodeArg, Output: NodeArg> {
method clone (line 33) | fn clone(&self) -> Self {
method default (line 45) | fn default() -> Self {
function new (line 51) | pub fn new() -> Self {
function current_input (line 74) | pub fn current_input(&self) -> Option<&Input> {
function current_output (line 81) | pub fn current_output(&self) -> Option<&Output> {
function done (line 88) | pub fn done(&self) -> NodeId<NoopNode<Output>> {
function transitions_to_done (line 93) | pub fn transitions_to_done(
function starts_with (line 101) | pub fn starts_with<T: TaskNode<Input = Input> + Clone + 'static>(
function validate_transitions (line 114) | pub fn validate_transitions(&self) -> Result<(), TaskError> {
function run (line 136) | pub async fn run(&mut self, input: impl Into<Input>) -> Result<Option<Ou...
function reset (line 148) | pub fn reset(&mut self) {
function resume (line 158) | pub async fn resume(&mut self) -> Result<Option<Output>, TaskError> {
function start_task (line 162) | async fn start_task(&mut self) -> Result<Option<Output>, TaskError> {
function current_node (line 228) | pub fn current_node<T: TaskNode + 'static>(&self) -> Option<&T> {
function node_at (line 233) | pub fn node_at<T: TaskNode + 'static>(&self, node_id: NodeId<T>) -> Opti...
function node_at_index (line 238) | pub fn node_at_index<T: TaskNode + 'static>(&self, index: usize) -> Opti...
function current_transition (line 248) | fn current_transition<T: TaskNode + 'static>(
function transition_at_index (line 255) | fn transition_at_index<T: TaskNode + 'static>(
function register_node (line 268) | pub fn register_node<T>(&mut self, node: T) -> NodeId<T>
function register_transition (line 297) | pub fn register_transition<'a, From, To, F>(
function register_transition_async (line 352) | pub fn register_transition_async<'a, From, To, F>(
type Error (line 409) | struct Error(String);
method fmt (line 412) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type IntNode (line 418) | struct IntNode;
type Input (line 421) | type Input = i32;
type Output (line 422) | type Output = i32;
type Error (line 423) | type Error = Error;
method evaluate (line 425) | async fn evaluate(
function sequential_3_node_task_reset_works (line 438) | async fn sequential_3_node_task_reset_works() {
FILE: swiftide-agents/src/tasks/transition.rs
type TransitionFn (line 11) | pub trait TransitionFn<Input: Send + Sync>:
type Transition (line 23) | pub(crate) struct Transition<
method clone (line 41) | fn clone(&self) -> Self {
function fmt (line 54) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type NextNode (line 63) | pub struct NextNode {
method new (line 70) | pub fn new<T: TaskNode + ?Sized>(node_id: NodeId<T>, context: T::Input...
type TransitionPayload (line 90) | pub enum TransitionPayload {
method from (line 84) | fn from(next_node: NextNode) -> Self {
method next_node (line 97) | pub fn next_node<T: TaskNode + ?Sized>(node_id: &NodeId<T>, context: T...
method pause (line 101) | pub fn pause() -> Self {
method error (line 105) | pub fn error(error: impl Into<Box<dyn std::error::Error + Send + Sync>...
type MarkedTransitionPayload (line 110) | pub struct MarkedTransitionPayload<To: TaskNode + ?Sized>(
function new (line 116) | pub fn new(payload: TransitionPayload) -> Self {
function into_inner (line 120) | pub fn into_inner(self) -> TransitionPayload {
type Target (line 126) | type Target = TransitionPayload;
function deref (line 128) | fn deref(&self) -> &Self::Target {
type AnyNodeTransition (line 134) | pub(crate) trait AnyNodeTransition: Any + Send + Sync + std::fmt::Debug ...
method transition_is_set (line 135) | fn transition_is_set(&self) -> bool;
method evaluate_next (line 137) | async fn evaluate_next(
method node_id (line 142) | fn node_id(&self) -> usize;
method evaluate_next (line 151) | async fn evaluate_next(
method transition_is_set (line 164) | fn transition_is_set(&self) -> bool {
method node_id (line 168) | fn node_id(&self) -> usize {
FILE: swiftide-agents/src/test_utils.rs
type Expectations (line 147) | type Expectations = Arc<Mutex<Vec<(Result<ToolOutput, ToolError>, Option...
type MockTool (line 150) | pub struct MockTool {
method default (line 157) | pub fn default() -> Self {
method new (line 160) | pub fn new(name: &'static str) -> Self {
method expect_invoke_ok (line 166) | pub fn expect_invoke_ok(
method expect_invoke (line 175) | pub fn expect_invoke(
method invoke (line 189) | async fn invoke(
method name (line 211) | fn name(&self) -> Cow<'_, str> {
method tool_spec (line 215) | fn tool_spec(&self) -> ToolSpec {
function from (line 225) | fn from(val: MockTool) -> Self {
method drop (line 231) | fn drop(&mut self) {
type MockHook (line 253) | pub struct MockHook {
method new (line 260) | pub fn new(name: &'static str) -> Self {
method expect_calls (line 268) | pub fn expect_calls(&mut self, expected_calls: usize) -> &mut Self {
method hook_fn (line 274) | pub fn hook_fn(&self) -> impl BeforeAllFn + use<> {
method on_start_fn (line 287) | pub fn on_start_fn(&self) -> impl OnStartFn + use<> {
method before_completion_fn (line 299) | pub fn before_completion_fn(&self) -> impl BeforeCompletionFn + use<> {
method after_completion_fn (line 312) | pub fn after_completion_fn(&self) -> impl AfterCompletionFn + use<> {
method after_tool_fn (line 325) | pub fn after_tool_fn(&self) -> impl AfterToolFn + use<> {
method before_tool_fn (line 338) | pub fn before_tool_fn(&self) -> impl BeforeToolFn + use<> {
method message_hook_fn (line 351) | pub fn message_hook_fn(&self) -> impl MessageHookFn + use<> {
method stop_hook_fn (line 364) | pub fn stop_hook_fn(&self) -> impl OnStopFn + use<> {
method on_stream_fn (line 377) | pub fn on_stream_fn(&self) -> impl OnStreamFn + use<> {
method drop (line 391) | fn drop(&mut self) {
FILE: swiftide-agents/src/tools/arg_preprocessor.rs
type ArgPreprocessor (line 8) | pub struct ArgPreprocessor;
method preprocess_tool_calls (line 11) | pub fn preprocess_tool_calls(tool_calls: &mut [ToolCall]) {
method preprocess (line 23) | pub fn preprocess(value: Option<&str>) -> Option<Cow<'_, str>> {
function take_first_occurrence_in_object (line 29) | fn take_first_occurrence_in_object(value: &str) -> Cow<'_, str> {
function test_preprocess_regular_json (line 53) | fn test_preprocess_regular_json() {
function test_preprocess_json_with_duplicate_keys (line 68) | fn test_preprocess_json_with_duplicate_keys() {
function test_no_preprocess_invalid_json (line 82) | fn test_no_preprocess_invalid_json() {
function test_no_input (line 89) | fn test_no_input() {
FILE: swiftide-agents/src/tools/control.rs
type Stop (line 13) | pub struct Stop {}
method invoke (line 17) | async fn invoke(
method name (line 25) | fn name(&self) -> Cow<'_, str> {
method tool_spec (line 29) | fn tool_spec(&self) -> ToolSpec {
function from (line 39) | fn from(val: Stop) -> Self {
type StopWithArgs (line 46) | pub struct StopWithArgs {
method with_parameters_schema (line 65) | pub fn with_parameters_schema(schema: Schema) -> Self {
method parameters_schema (line 72) | fn parameters_schema(&self) -> Schema {
method default (line 52) | fn default() -> Self {
type DefaultStopWithArgsSpec (line 80) | struct DefaultStopWithArgsSpec {
method invoke (line 86) | async fn invoke(
method name (line 108) | fn name(&self) -> Cow<'_, str> {
method tool_spec (line 112) | fn tool_spec(&self) -> ToolSpec {
function from (line 125) | fn from(val: StopWithArgs) -> Self {
type AgentFailedArgsSpec (line 131) | struct AgentFailedArgsSpec {
type AgentCanFail (line 139) | pub struct AgentCanFail {
method with_parameters_schema (line 158) | pub fn with_parameters_schema(schema: Schema) -> Self {
method parameters_schema (line 165) | fn parameters_schema(&self) -> Schema {
method default (line 145) | fn default() -> Self {
method invoke (line 174) | async fn invoke(
method name (line 198) | fn name(&self) -> Cow<'_, str> {
method tool_spec (line 202) | fn tool_spec(&self) -> ToolSpec {
function from (line 215) | fn from(val: AgentCanFail) -> Self {
type ApprovalRequired (line 222) | pub struct ApprovalRequired(pub Box<dyn Tool>);
method new (line 226) | pub fn new(tool: impl Tool + 'static) -> Self {
method invoke (line 233) | async fn invoke(
method name (line 250) | fn name(&self) -> Cow<'_, str> {
method tool_spec (line 254) | fn tool_spec(&self) -> ToolSpec {
function from (line 260) | fn from(val: ApprovalRequired) -> Self {
function dummy_tool_call (line 271) | fn dummy_tool_call(name: &str, args: Option<&str>) -> ToolCall {
function test_stop_tool (line 280) | async fn test_stop_tool() {
function test_stop_with_args_tool (line 289) | async fn test_stop_with_args_tool() {
function test_agent_can_fail_tool (line 299) | async fn test_agent_can_fail_tool() {
type CustomFailArgs (line 309) | struct CustomFailArgs {
function test_agent_can_fail_custom_schema_in_spec (line 315) | fn test_agent_can_fail_custom_schema_in_spec() {
function test_agent_can_fail_custom_schema_forwards_payload (line 323) | async fn test_agent_can_fail_custom_schema_forwards_payload() {
function test_agent_can_fail_default_schema_matches_previous (line 337) | fn test_agent_can_fail_default_schema_matches_previous() {
function test_approval_required_feedback_required (line 345) | async fn test_approval_required_feedback_required() {
type CustomStopArgs (line 357) | struct CustomStopArgs {
function test_stop_with_args_custom_schema_in_spec (line 362) | fn test_stop_with_args_custom_schema_in_spec() {
function test_stop_with_args_custom_schema_forwards_payload (line 370) | async fn test_stop_with_args_custom_schema_forwards_payload() {
function test_stop_with_args_default_schema_matches_previous (line 381) | fn test_stop_with_args_default_schema_matches_previous() {
FILE: swiftide-agents/src/tools/local_executor.rs
type LocalExecutor (line 23) | pub struct LocalExecutor {
method new (line 54) | pub fn new(workdir: impl Into<PathBuf>) -> Self {
method builder (line 64) | pub fn builder() -> LocalExecutorBuilder {
method resolve_workdir (line 68) | fn resolve_workdir(&self, cmd: &Command) -> PathBuf {
method resolve_timeout (line 76) | fn resolve_timeout(&self, cmd: &Command) -> Option<Duration> {
method exec_shell (line 81) | async fn exec_shell(
method exec_read_file (line 221) | async fn exec_read_file(
method exec_write_file (line 251) | async fn exec_write_file(
method collect_process_output (line 283) | async fn collect_process_output(
method merge_output (line 312) | fn merge_output(stdout: &[String], stderr: &[String]) -> CommandOutput {
method default (line 42) | fn default() -> Self {
method exec_cmd (line 326) | async fn exec_cmd(&self, cmd: &Command) -> Result<swiftide_core::Command...
method stream_files (line 341) | async fn stream_files(
function test_local_executor_write_and_read_file (line 366) | async fn test_local_executor_write_and_read_file() -> anyhow::Result<()> {
function test_local_executor_echo_hello_world (line 410) | async fn test_local_executor_echo_hello_world() -> anyhow::Result<()> {
function test_local_executor_shell_timeout (line 434) | async fn test_local_executor_shell_timeout() -> anyhow::Result<()> {
function test_local_executor_default_timeout_applies (line 458) | async fn test_local_executor_default_timeout_applies() -> anyhow::Result...
function test_local_executor_clear_env (line 479) | async fn test_local_executor_clear_env() -> anyhow::Result<()> {
function test_local_executor_add_env (line 505) | async fn test_local_executor_add_env() -> anyhow::Result<()> {
function test_local_executor_env_remove (line 533) | async fn test_local_executor_env_remove() -> anyhow::Result<()> {
function test_local_executor_run_shebang (line 559) | async fn test_local_executor_run_shebang() -> anyhow::Result<()> {
function test_local_executor_multiline_with_quotes (line 588) | async fn test_local_executor_multiline_with_quotes() -> anyhow::Result<(...
function test_local_executor_write_and_read_file_commands (line 626) | async fn test_local_executor_write_and_read_file_commands() -> anyhow::R...
function test_local_executor_stream_files (line 673) | async fn test_local_executor_stream_files() -> anyhow::Result<()> {
function test_local_executor_honors_workdir (line 707) | async fn test_local_executor_honors_workdir() -> anyhow::Result<()> {
function test_local_executor_command_current_dir (line 749) | async fn test_local_executor_command_current_dir() -> anyhow::Result<()> {
function test_local_executor_current_dir (line 786) | async fn test_local_executor_current_dir() -> anyhow::Result<()> {
function test_local_executor_current_dir_dyn (line 808) | async fn test_local_executor_current_dir_dyn() -> anyhow::Result<()> {
FILE: swiftide-agents/src/tools/mcp.rs
type ToolFilter (line 28) | pub enum ToolFilter {
type McpToolbox (line 38) | pub struct McpToolbox {
method with_blacklist (line 49) | pub fn with_blacklist<ITEM: Into<String>, I: IntoIterator<Item = ITEM>>(
method with_whitelist (line 59) | pub fn with_whitelist<ITEM: Into<String>, I: IntoIterator<Item = ITEM>>(
method with_filter (line 69) | pub fn with_filter(&mut self, filter: ToolFilter) -> &mut Self {
method with_name (line 75) | pub fn with_name(&mut self, name: impl Into<String>) -> &mut Self {
method name (line 80) | pub fn name(&self) -> &str {
method try_from_transport (line 89) | pub async fn try_from_transport<
method from_running_service (line 106) | pub fn from_running_service(
method default_client_info (line 116) | fn default_client_info() -> ClientInfo {
method cancel (line 137) | pub async fn cancel(&mut self) -> Result<()> {
method available_tools (line 158) | async fn available_tools(&self) -> Result<Vec<Box<dyn Tool>>> {
method name (line 238) | fn name(&self) -> Cow<'_, str> {
type McpTool (line 244) | struct McpTool {
method invoke (line 253) | async fn invoke(
method name (line 327) | fn name(&self) -> std::borrow::Cow<'_, str> {
method tool_spec (line 331) | fn tool_spec(&self) -> ToolSpec {
constant SOCKET_PATH (line 343) | const SOCKET_PATH: &str = "/tmp/swiftide-mcp.sock";
constant EXPECTED_PREFIX (line 344) | const EXPECTED_PREFIX: &str = "rmcp";
function test_socket (line 348) | async fn test_socket() {
function server (line 456) | async fn server(unix_listener: UnixListener) -> anyhow::Result<()> {
function client (line 476) | async fn client() -> anyhow::Result<McpToolbox> {
type Request (line 497) | pub struct Request {
type OptRequest (line 503) | pub struct OptRequest {
type Calculator (line 508) | pub struct Calculator {
method new (line 514) | pub fn new() -> Self {
method sum (line 522) | fn sum(
method sub (line 533) | fn sub(
method optional (line 544) | fn optional(
method get_info (line 556) | fn get_info(&self) -> ServerInfo {
FILE: swiftide-core/src/agent_traits.rs
type ToolExecutor (line 30) | pub trait ToolExecutor: Send + Sync + DynClone {
method exec_cmd (line 32) | async fn exec_cmd(&self, cmd: &Command) -> Result<CommandOutput, Comma...
method stream_files (line 35) | async fn stream_files(
method exec_cmd (line 108) | async fn exec_cmd(&self, cmd: &Command) -> Result<CommandOutput, Comma...
method stream_files (line 113) | async fn stream_files(
method exec_cmd (line 153) | async fn exec_cmd(&self, cmd: &Command) -> Result<CommandOutput, Comma...
method stream_files (line 157) | async fn stream_files(
method exec_cmd (line 168) | async fn exec_cmd(&self, cmd: &Command) -> Result<CommandOutput, Comma...
method stream_files (line 172) | async fn stream_files(
method exec_cmd (line 183) | async fn exec_cmd(&self, cmd: &Command) -> Result<CommandOutput, Comma...
method stream_files (line 187) | async fn stream_files(
type ScopedExecutor (line 49) | pub struct ScopedExecutor<E> {
function new (line 56) | pub fn new(executor: E, scope: impl Into<PathBuf>) -> Self {
function apply_scope (line 64) | fn apply_scope<'a>(&'a self, cmd: &'a Command) -> Cow<'a, Command> {
function scoped_path (line 84) | fn scoped_path<'a>(&'a self, path: &'a Path) -> Cow<'a, Path> {
function inner (line 93) | pub fn inner(&self) -> &E {
function scope (line 98) | pub fn scope(&self) -> &Path {
type ExecutorExt (line 126) | pub trait ExecutorExt {
method scoped (line 128) | fn scoped(&self, path: impl Into<PathBuf>) -> ScopedExecutor<&Self>;
method scoped_owned (line 130) | fn scoped_owned(self, path: impl Into<PathBuf>) -> ScopedExecutor<Self>
method scoped (line 139) | fn scoped(&self, path: impl Into<PathBuf>) -> ScopedExecutor<&Self> {
method scoped_owned (line 143) | fn scoped_owned(self, path: impl Into<PathBuf>) -> ScopedExecutor<Self> {
type CommandError (line 197) | pub enum CommandError {
method from (line 215) | fn from(err: std::io::Error) -> Self {
type Command (line 232) | pub enum Command {
method shell (line 252) | pub fn shell<S: Into<String>>(cmd: S) -> Self {
method read_file (line 260) | pub fn read_file<P: Into<PathBuf>>(path: P) -> Self {
method write_file (line 268) | pub fn write_file<P: Into<PathBuf>, S: Into<String>>(path: P, content:...
method with_current_dir (line 282) | pub fn with_current_dir<P: Into<PathBuf>>(mut self, path: P) -> Self {
method current_dir (line 289) | pub fn current_dir<P: Into<PathBuf>>(&mut self, path: P) -> &mut Self {
method clear_current_dir (line 301) | pub fn clear_current_dir(&mut self) -> &mut Self {
method current_dir_path (line 312) | pub fn current_dir_path(&self) -> Option<&Path> {
method with_timeout (line 322) | pub fn with_timeout(mut self, timeout: Duration) -> Self {
method timeout (line 328) | pub fn timeout(&mut self, timeout: Duration) -> &mut Self {
method clear_timeout (line 340) | pub fn clear_timeout(&mut self) -> &mut Self {
method timeout_duration (line 352) | pub fn timeout_duration(&self) -> Option<&Duration> {
type CommandOutput (line 363) | pub struct CommandOutput {
method empty (line 370) | pub fn empty() -> Self {
method new (line 376) | pub fn new(output: impl Into<String>) -> Self {
method is_empty (line 381) | pub fn is_empty(&self) -> bool {
method fmt (line 387) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method from (line 393) | fn from(value: T) -> Self {
method as_ref (line 401) | fn as_ref(&self) -> &str {
type ToolFeedback (line 409) | pub enum ToolFeedback {
method approved (line 415) | pub fn approved() -> Self {
method refused (line 419) | pub fn refused() -> Self {
method payload (line 423) | pub fn payload(&self) -> Option<&serde_json::Value> {
method with_payload (line 432) | pub fn with_payload(self, payload: serde_json::Value) -> Self {
type AgentContext (line 446) | pub trait AgentContext: Send + Sync {
method next_completion (line 456) | async fn next_completion(&self) -> Result<Option<Vec<ChatMessage>>>;
method current_new_messages (line 459) | async fn current_new_messages(&self) -> Result<Vec<ChatMessage>>;
method add_messages (line 462) | async fn add_messages(&self, item: Vec<ChatMessage>) -> Result<()>;
method add_message (line 465) | async fn add_message(&self, item: ChatMessage) -> Result<()>;
method exec_cmd (line 471) | async fn exec_cmd(&self, cmd: &Command) -> Result<CommandOutput, Comma...
method executor (line 473) | fn executor(&self) -> &Arc<dyn ToolExecutor>;
method history (line 475) | async fn history(&self) -> Result<Vec<ChatMessage>>;
method replace_history (line 478) | async fn replace_history(&self, items: Vec<ChatMessage>) -> Result<()>;
method redrive (line 484) | async fn redrive(&self) -> Result<()>;
method has_received_feedback (line 488) | async fn has_received_feedback(&self, tool_call: &ToolCall) -> Option<...
method feedback_received (line 490) | async fn feedback_received(&self, tool_call: &ToolCall, feedback: &Too...
method next_completion (line 495) | async fn next_completion(&self) -> Result<Option<Vec<ChatMessage>>> {
method current_new_messages (line 499) | async fn current_new_messages(&self) -> Result<Vec<ChatMessage>> {
method add_messages (line 503) | async fn add_messages(&self, item: Vec<ChatMessage>) -> Result<()> {
method add_message (line 507) | async fn add_message(&self, item: ChatMessage) -> Result<()> {
method exec_cmd (line 512) | async fn exec_cmd(&self, cmd: &Command) -> Result<CommandOutput, Comma...
method executor (line 516) | fn executor(&self) -> &Arc<dyn ToolExecutor> {
method history (line 520) | async fn history(&self) -> Result<Vec<ChatMessage>> {
method replace_history (line 524) | async fn replace_history(&self, items: Vec<ChatMessage>) -> Result<()> {
method redrive (line 528) | async fn redrive(&self) -> Result<()> {
method has_received_feedback (line 532) | async fn has_received_feedback(&self, tool_call: &ToolCall) -> Option<...
method feedback_received (line 536) | async fn feedback_received(&self, tool_call: &ToolCall, feedback: &Too...
method next_completion (line 543) | async fn next_completion(&self) -> Result<Option<Vec<ChatMessage>>> {
method current_new_messages (line 547) | async fn current_new_messages(&self) -> Result<Vec<ChatMessage>> {
method add_messages (line 551) | async fn add_messages(&self, item: Vec<ChatMessage>) -> Result<()> {
method add_message (line 555) | async fn add_message(&self, item: ChatMessage) -> Result<()> {
method exec_cmd (line 560) | async fn exec_cmd(&self, cmd: &Command) -> Result<CommandOutput, Comma...
method executor (line 564) | fn executor(&self) -> &Arc<dyn ToolExecutor> {
method history (line 568) | async fn history(&self) -> Result<Vec<ChatMessage>> {
method replace_history (line 572) | async fn replace_history(&self, items: Vec<ChatMessage>) -> Result<()> {
method redrive (line 576) | async fn redrive(&self) -> Result<()> {
method has_received_feedback (line 580) | async fn has_received_feedback(&self, tool_call: &ToolCall) -> Option<...
method feedback_received (line 584) | async fn feedback_received(&self, tool_call: &ToolCall, feedback: &Too...
method next_completion (line 591) | async fn next_completion(&self) -> Result<Option<Vec<ChatMessage>>> {
method current_new_messages (line 595) | async fn current_new_messages(&self) -> Result<Vec<ChatMessage>> {
method add_messages (line 599) | async fn add_messages(&self, item: Vec<ChatMessage>) -> Result<()> {
method add_message (line 603) | async fn add_message(&self, item: ChatMessage) -> Result<()> {
method exec_cmd (line 608) | async fn exec_cmd(&self, cmd: &Command) -> Result<CommandOutput, Comma...
method executor (line 612) | fn executor(&self) -> &Arc<dyn ToolExecutor> {
method history (line 616) | async fn history(&self) -> Result<Vec<ChatMessage>> {
method replace_history (line 620) | async fn replace_history(&self, items: Vec<ChatMessage>) -> Result<()> {
method redrive (line 624) | async fn redrive(&self) -> Result<()> {
method has_received_feedback (line 628) | async fn has_received_feedback(&self, tool_call: &ToolCall) -> Option<...
method feedback_received (line 632) | async fn feedback_received(&self, tool_call: &ToolCall, feedback: &Too...
method next_completion (line 642) | async fn next_completion(&self) -> Result<Option<Vec<ChatMessage>>> {
method current_new_messages (line 646) | async fn current_new_messages(&self) -> Result<Vec<ChatMessage>> {
method add_messages (line 650) | async fn add_messages(&self, _item: Vec<ChatMessage>) -> Result<()> {
method add_message (line 654) | async fn add_message(&self, _item: ChatMessage) -> Result<()> {
method exec_cmd (line 658) | async fn exec_cmd(&self, _cmd: &Command) -> Result<CommandOutput, Comm...
method executor (line 664) | fn executor(&self) -> &Arc<dyn ToolExecutor> {
method history (line 668) | async fn history(&self) -> Result<Vec<ChatMessage>> {
method replace_history (line 672) | async fn replace_history(&self, _items: Vec<ChatMessage>) -> Result<()> {
method redrive (line 676) | async fn redrive(&self) -> Result<()> {
method has_received_feedback (line 680) | async fn has_received_feedback(&self, _tool_call: &ToolCall) -> Option...
method feedback_received (line 684) | async fn feedback_received(
type MessageHistory (line 700) | pub trait MessageHistory: Send + Sync + std::fmt::Debug {
method history (line 702) | async fn history(&self) -> Result<Vec<ChatMessage>>;
method push_owned (line 705) | async fn push_owned(&self, item: ChatMessage) -> Result<()>;
method overwrite (line 708) | async fn overwrite(&self, items: Vec<ChatMessage>) -> Result<()>;
method push (line 711) | async fn push(&self, item: &ChatMessage) -> Result<()> {
method extend (line 716) | async fn extend(&self, items: &[ChatMessage]) -> Result<()> {
method extend_owned (line 722) | async fn extend_owned(&self, items: Vec<ChatMessage>) -> Result<()> {
method history (line 733) | async fn history(&self) -> Result<Vec<ChatMessage>> {
method push_owned (line 737) | async fn push_owned(&self, item: ChatMessage) -> Result<()> {
method overwrite (line 743) | async fn overwrite(&self, items: Vec<ChatMessage>) -> Result<()> {
FILE: swiftide-core/src/chat_completion/chat_completion_request.rs
type ChatCompletionRequest (line 11) | pub struct ChatCompletionRequest<'a> {
function builder (line 18) | pub fn builder() -> ChatCompletionRequestBuilder<'a> {
function messages (line 23) | pub fn messages(&self) -> &[ChatMessage] {
function tools_spec (line 28) | pub fn tools_spec(&self) -> &BTreeSet<ToolSpec> {
function to_owned (line 33) | pub fn to_owned(&self) -> ChatCompletionRequest<'static> {
function from (line 42) | fn from(messages: Vec<ChatMessage>) -> Self {
function from (line 51) | fn from(messages: &'a [ChatMessage]) -> Self {
function tools_spec (line 61) | pub fn tools_spec<I>(&mut self, tools_spec: I) -> &mut Self
function tools (line 70) | pub fn tools<I, T>(&mut self, tools: I) -> &mut Self
function tool (line 83) | pub fn tool<T>(&mut self, tool: T) -> &mut Self
function tool_specs (line 92) | pub fn tool_specs<I>(&mut self, specs: I) -> &mut Self
function message (line 102) | pub fn message(&mut self, message: impl Into<ChatMessage>) -> &mut Self {
function messages_iter (line 115) | pub fn messages_iter<I>(&mut self, messages: I) -> &mut Self
function tool_specs_are_stored_in_deterministic_order (line 138) | fn tool_specs_are_stored_in_deterministic_order() {
function schema_from_json (line 180) | fn schema_from_json(value: serde_json::Value) -> Schema {
FILE: swiftide-core/src/chat_completion/chat_completion_response.rs
type ChatCompletionResponse (line 15) | pub struct ChatCompletionResponse {
method builder (line 389) | pub fn builder() -> ChatCompletionResponseBuilder {
method message (line 393) | pub fn message(&self) -> Option<&str> {
method tool_calls (line 397) | pub fn tool_calls(&self) -> Option<&[ToolCall]> {
method append_message_delta (line 402) | pub fn append_message_delta(&mut self, message_delta: Option<&str>) ->...
method append_tool_call_delta (line 430) | pub fn append_tool_call_delta(
method append_usage_delta (line 481) | pub fn append_usage_delta(
method finalize_tools_from_stream (line 504) | fn finalize_tools_from_stream(&mut self) {
method default (line 40) | fn default() -> Self {
type Usage (line 55) | pub struct Usage {
method builder (line 69) | pub fn builder() -> UsageBuilder {
method normalized (line 77) | pub fn normalized(&self) -> NormalizedUsage {
method from (line 291) | fn from(usage: &CompletionUsage) -> Self {
method from (line 340) | fn from(usage: &ResponseUsage) -> Self {
method from (line 360) | fn from(usage: &EmbeddingUsage) -> Self {
type UsageDetails (line 138) | pub struct UsageDetails {
type NormalizedUsage (line 155) | pub struct NormalizedUsage {
type NormalizedUsageDetails (line 169) | pub struct NormalizedUsageDetails {
type NormalizedInputUsageDetails (line 178) | pub struct NormalizedInputUsageDetails {
method is_empty (line 188) | fn is_empty(&self) -> bool {
type NormalizedOutputUsageDetails (line 195) | pub struct NormalizedOutputUsageDetails {
method is_empty (line 211) | fn is_empty(&self) -> bool {
type PromptTokensDetails (line 221) | pub struct PromptTokensDetails {
method is_empty (line 232) | pub fn is_empty(&self) -> bool {
type CompletionTokensDetails (line 239) | pub struct CompletionTokensDetails {
method is_empty (line 256) | pub fn is_empty(&self) -> bool {
type InputTokenDetails (line 266) | pub struct InputTokenDetails {
type OutputTokenDetails (line 274) | pub struct OutputTokenDetails {
type ChatCompletionResponseDelta (line 372) | pub struct ChatCompletionResponseDelta {
type ToolCallAccum (line 382) | pub struct ToolCallAccum {
method maybe_message (line 529) | pub fn maybe_message<T: Into<Option<String>>>(&mut self, message: T) -> ...
method maybe_tool_calls (line 534) | pub fn maybe_tool_calls<T: Into<Option<Vec<ToolCall>>>>(&mut self, tool_...
FILE: swiftide-core/src/chat_completion/chat_message.rs
type ReasoningItem (line 9) | pub struct ReasoningItem {
type ReasoningStatus (line 27) | pub enum ReasoningStatus {
type ChatMessageContentSource (line 35) | pub enum ChatMessageContentSource {
method url (line 55) | pub fn url(url: impl Into<String>) -> Self {
method bytes (line 59) | pub fn bytes<M>(data: impl Into<Vec<u8>>, media_type: Option<M>) -> Self
method s3 (line 69) | pub fn s3<O>(uri: impl Into<String>, bucket_owner: Option<O>) -> Self
method file_id (line 79) | pub fn file_id(file_id: impl Into<String>) -> Self {
method from (line 87) | fn from(value: String) -> Self {
method from (line 93) | fn from(value: &str) -> Self {
method from (line 101) | fn from(value: Vec<u8>) -> Self {
method from (line 110) | fn from(value: &[u8]) -> Self {
method fmt (line 119) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type ChatMessageContentPart (line 144) | pub enum ChatMessageContentPart {
method text (line 173) | pub fn text(text: impl Into<String>) -> Self {
method image (line 177) | pub fn image(source: impl Into<ChatMessageContentSource>) -> Self {
method image_with_format (line 184) | pub fn image_with_format(
method document (line 194) | pub fn document(source: impl Into<ChatMessageContentSource>) -> Self {
method document_with_name (line 202) | pub fn document_with_name(
method audio (line 213) | pub fn audio(source: impl Into<ChatMessageContentSource>) -> Self {
method video (line 220) | pub fn video(source: impl Into<ChatMessageContentSource>) -> Self {
method fmt (line 229) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type ChatMessage (line 264) | pub enum ChatMessage {
method fmt (line 278) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method new_system (line 314) | pub fn new_system(message: impl Into<String>) -> Self {
method new_user (line 318) | pub fn new_user(message: impl Into<String>) -> Self {
method new_user_with_parts (line 322) | pub fn new_user_with_parts(parts: impl Into<Vec<ChatMessageContentPart...
method new_assistant (line 326) | pub fn new_assistant(
method new_tool_output (line 333) | pub fn new_tool_output(tool_call: impl Into<ToolCall>, output: impl In...
method new_reasoning (line 337) | pub fn new_reasoning(message: ReasoningItem) -> Self {
method new_summary (line 341) | pub fn new_summary(message: impl Into<String>) -> Self {
method to_owned (line 346) | pub fn to_owned(&self) -> Self {
method as_ref (line 357) | fn as_ref(&self) -> &str {
function summarize_user_parts (line 371) | fn summarize_user_parts(parts: &[ChatMessageContentPart]) -> (String, us...
function truncate_data_url (line 386) | fn truncate_data_url(url: &str) -> Cow<'_, str> {
FILE: swiftide-core/src/chat_completion/errors.rs
type ToolError (line 14) | pub enum ToolError {
method wrong_arguments (line 33) | pub fn wrong_arguments(e: impl Into<serde_json::Error>) -> Self {
method missing_arguments (line 38) | pub fn missing_arguments(tool_name: impl Into<Cow<'static, str>>) -> S...
method execution_failed (line 43) | pub fn execution_failed(e: impl Into<CommandError>) -> Self {
method unknown (line 48) | pub fn unknown(e: impl Into<anyhow::Error>) -> Self {
type BoxedError (line 53) | type BoxedError = Box<dyn std::error::Error + Send + Sync>;
type LanguageModelError (line 56) | pub enum LanguageModelError {
method permanent (line 66) | pub fn permanent(e: impl Into<BoxedError>) -> Self {
method transient (line 70) | pub fn transient(e: impl Into<BoxedError>) -> Self {
method context_length_exceeded (line 74) | pub fn context_length_exceeded(e: impl Into<BoxedError>) -> Self {
method from (line 80) | fn from(e: BoxedError) -> Self {
method from (line 86) | fn from(e: anyhow::Error) -> Self {
method from (line 94) | fn from(val: LanguageModelError) -> Self {
FILE: swiftide-core/src/chat_completion/tool_schema.rs
type StrictToolParametersSchema (line 6) | pub struct StrictToolParametersSchema {
method try_from_raw (line 45) | pub(super) fn try_from_raw(schema: Option<&Schema>) -> Result<Self, To...
method into_json (line 58) | pub fn into_json(self) -> Value {
method as_json (line 62) | pub fn as_json(&self) -> &Value {
type ToolSchemaError (line 11) | pub enum ToolSchemaError {
function parse_schema_value (line 67) | fn parse_schema_value(value: &Value, path: &SchemaPath) -> Result<Value,...
function parse_schema_object (line 77) | fn parse_schema_object(
function normalize_schema_object (line 91) | fn normalize_schema_object(
function rewrite_nullable_type_union (line 102) | fn rewrite_nullable_type_union(schema: &mut Map<String, Value>) {
function rewrite_nullable_one_of (line 130) | fn rewrite_nullable_one_of(schema: &mut Map<String, Value>) {
function is_nullable_union (line 141) | fn is_nullable_union(entries: &[Value]) -> bool {
function nullable_type_union (line 145) | fn nullable_type_union(entries: &[Value]) -> Option<&str> {
function is_null_schema (line 168) | fn is_null_schema(value: &Value) -> bool {
function extract_schema_annotations (line 175) | fn extract_schema_annotations(schema: &Map<String, Value>) -> Map<String...
function schema_annotation_keys (line 187) | fn schema_annotation_keys() -> &'static [&'static str] {
function strip_ref_annotation_siblings (line 199) | fn strip_ref_annotation_siblings(
function parse_object_schema (line 242) | fn parse_object_schema(
function parse_non_object_schema (line 315) | fn parse_non_object_schema(
function recurse_schema_children (line 324) | fn recurse_schema_children(
function parse_schema_map (line 367) | fn parse_schema_map(
function schema_is_object (line 392) | fn schema_is_object(schema: &Map<String, Value>) -> bool {
function type_includes_object (line 400) | fn type_includes_object(value: Option<&Value>) -> bool {
type SchemaPath (line 412) | pub(super) struct SchemaPath(Vec<String>);
method root (line 415) | fn root() -> Self {
method with_key (line 419) | fn with_key(&self, key: impl Into<String>) -> Self {
method with_index (line 425) | fn with_index(&self, key: impl Into<String>, index: usize) -> Self {
method fmt (line 434) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type NestedCommentArgs (line 445) | struct NestedCommentArgs {
type NestedCommentRequest (line 451) | struct NestedCommentRequest {
type FreeformObject (line 466) | struct FreeformObject(serde_json::Map<String, Value>);
method schema_name (line 469) | fn schema_name() -> std::borrow::Cow<'static, str> {
method json_schema (line 473) | fn json_schema(_generator: &mut schemars::SchemaGenerator) -> Schema {
type CreateViewArgs (line 484) | struct CreateViewArgs {
type CreateViewRequest (line 490) | struct CreateViewRequest {
function strict_tool_schema_rejects_nested_freeform_object_wrappers (line 495) | fn strict_tool_schema_rejects_nested_freeform_object_wrappers() {
function strict_tool_schema_rewrites_nullable_type_unions_to_any_of (line 506) | fn strict_tool_schema_rewrites_nullable_type_unions_to_any_of() {
function strict_tool_schema_rewrites_nullable_one_of_to_any_of (line 532) | fn strict_tool_schema_rewrites_nullable_one_of_to_any_of() {
function strict_tool_schema_strips_ref_annotation_siblings (line 561) | fn strict_tool_schema_strips_ref_annotation_siblings() {
function strict_tool_schema_preserves_nullable_numeric_constraints_on_the_non_null_branch (line 594) | fn strict_tool_schema_preserves_nullable_numeric_constraints_on_the_non_...
function strict_tool_schema_moves_nullable_array_constraints_into_the_array_branch (line 630) | fn strict_tool_schema_moves_nullable_array_constraints_into_the_array_br...
function strict_tool_schema_preserves_optional_nested_fields_before_provider_shaping (line 659) | fn strict_tool_schema_preserves_optional_nested_fields_before_provider_s...
FILE: swiftide-core/src/chat_completion/tools.rs
type ToolOutput (line 14) | pub enum ToolOutput {
method text (line 32) | pub fn text(text: impl Into<String>) -> Self {
method feedback_required (line 36) | pub fn feedback_required(feedback: Option<serde_json::Value>) -> Self {
method stop (line 40) | pub fn stop() -> Self {
method stop_with_args (line 44) | pub fn stop_with_args(output: impl Into<serde_json::Value>) -> Self {
method agent_failed (line 48) | pub fn agent_failed(output: impl Into<serde_json::Value>) -> Self {
method fail (line 52) | pub fn fail(text: impl Into<String>) -> Self {
method content (line 56) | pub fn content(&self) -> Option<&str> {
method as_text (line 64) | pub fn as_text(&self) -> Option<&str> {
method as_fail (line 72) | pub fn as_fail(&self) -> Option<&str> {
method as_stop (line 80) | pub fn as_stop(&self) -> Option<&serde_json::Value> {
method as_agent_failed (line 88) | pub fn as_agent_failed(&self) -> Option<&serde_json::Value> {
method as_feedback_required (line 96) | pub fn as_feedback_required(&self) -> Option<&serde_json::Value> {
method from (line 105) | fn from(value: S) -> Self {
method fmt (line 110) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type ToolCall (line 137) | pub struct ToolCall {
method hash (line 146) | fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
method fmt (line 153) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method builder (line 165) | pub fn builder() -> ToolCallBuilder {
method id (line 169) | pub fn id(&self) -> &str {
method name (line 173) | pub fn name(&self) -> &str {
method args (line 177) | pub fn args(&self) -> Option<&str> {
method with_args (line 181) | pub fn with_args(&mut self, args: Option<String>) {
method maybe_args (line 187) | pub fn maybe_args<T: Into<Option<String>>>(&mut self, args: T) -> &mut S...
method maybe_id (line 192) | pub fn maybe_id<T: Into<Option<String>>>(&mut self, id: T) -> &mut Self {
method maybe_name (line 197) | pub fn maybe_name<T: Into<Option<String>>>(&mut self, name: T) -> &mut S...
type ToolSpec (line 210) | pub struct ToolSpec {
method builder (line 237) | pub fn builder() -> ToolSpecBuilder {
method strict_parameters_schema (line 247) | pub fn strict_parameters_schema(&self) -> Result<StrictToolParametersS...
method canonical_parameters_schema_json (line 259) | pub fn canonical_parameters_schema_json(&self) -> Result<JsonValue, To...
method hash (line 323) | fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
type ToolSpecError (line 223) | pub enum ToolSpecError {
type ToolSpecBuildError (line 229) | pub enum ToolSpecBuildError {
method build (line 274) | pub fn build(&self) -> Result<ToolSpec, ToolSpecBuildError> {
method eq (line 298) | fn eq(&self, other: &Self) -> bool {
method partial_cmp (line 308) | fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
method cmp (line 314) | fn cmp(&self, other: &Self) -> Ordering {
function tool_spec_schema_key (line 330) | fn tool_spec_schema_key(spec: &ToolSpec) -> String {
function canonicalize_json (line 343) | pub fn canonicalize_json(value: JsonValue) -> JsonValue {
type ExampleArgs (line 373) | struct ExampleArgs {
type NestedCommentArgs (line 378) | struct NestedCommentArgs {
type NestedCommentRequest (line 384) | struct NestedCommentRequest {
type FreeformObject (line 399) | struct FreeformObject(serde_json::Map<String, Value>);
method schema_name (line 402) | fn schema_name() -> std::borrow::Cow<'static, str> {
method json_schema (line 406) | fn json_schema(_generator: &mut schemars::SchemaGenerator) -> Schema {
type CreateViewArgs (line 417) | struct CreateViewArgs {
type CreateViewRequest (line 423) | struct CreateViewRequest {
function tool_spec_serializes_schema (line 428) | fn tool_spec_serializes_schema() {
function tool_spec_is_hashable (line 444) | fn tool_spec_is_hashable() {
function tool_spec_hash_is_stable_across_schema_key_order (line 460) | fn tool_spec_hash_is_stable_across_schema_key_order() {
function tool_spec_order_is_stable_across_schema_key_order (line 503) | fn tool_spec_order_is_stable_across_schema_key_order() {
function strict_parameters_schema_returns_canonical_nested_schema (line 542) | fn strict_parameters_schema_returns_canonical_nested_schema() {
function strict_parameters_schema_sets_additional_properties_false_on_nested_typed_objects (line 573) | fn strict_parameters_schema_sets_additional_properties_false_on_nested_t...
function tool_spec_builder_rejects_nested_freeform_objects_in_strict_mode (line 598) | fn tool_spec_builder_rejects_nested_freeform_objects_in_strict_mode() {
function strict_parameters_schema_preserves_optional_nested_fields (line 612) | fn strict_parameters_schema_preserves_optional_nested_fields() {
FILE: swiftide-core/src/chat_completion/traits.rs
type ChatCompletionStream (line 16) | pub type ChatCompletionStream =
type ChatCompletion (line 19) | pub trait ChatCompletion: Send + Sync + DynClone {
method complete (line 20) | async fn complete(
method complete_stream (line 27) | async fn complete_stream(&self, request: &ChatCompletionRequest<'_>) -...
method complete (line 34) | async fn complete(
method complete_stream (line 41) | async fn complete_stream(&self, request: &ChatCompletionRequest<'_>) -...
method complete (line 48) | async fn complete(
method complete_stream (line 55) | async fn complete_stream(&self, request: &ChatCompletionRequest<'_>) -...
method complete (line 65) | async fn complete(
method complete_stream (line 72) | async fn complete_stream(&self, request: &ChatCompletionRequest<'_>) -...
function from (line 81) | fn from(llm: &LLM) -> Self {
type Tool (line 97) | pub trait Tool: Send + Sync + DynClone {
method invoke (line 99) | async fn invoke(
method name (line 105) | fn name(&self) -> Cow<'_, str>;
method tool_spec (line 107) | fn tool_spec(&self) -> ToolSpec;
method boxed (line 109) | fn boxed<'a>(self) -> Box<dyn Tool + 'a>
method invoke (line 186) | async fn invoke(
method name (line 193) | fn name(&self) -> Cow<'_, str> {
method tool_spec (line 196) | fn tool_spec(&self) -> ToolSpec {
type ToolBox (line 125) | pub trait ToolBox: Send + Sync + DynClone {
method available_tools (line 126) | async fn available_tools(&self) -> Result<Vec<Box<dyn Tool>>>;
method name (line 128) | fn name(&self) -> Cow<'_, str> {
method boxed (line 132) | fn boxed<'a>(self) -> Box<dyn ToolBox + 'a>
method available_tools (line 142) | async fn available_tools(&self) -> Result<Vec<Box<dyn Tool>>> {
method available_tools (line 149) | async fn available_tools(&self) -> Result<Vec<Box<dyn Tool>>> {
method available_tools (line 156) | async fn available_tools(&self) -> Result<Vec<Box<dyn Tool>>> {
method available_tools (line 163) | async fn available_tools(&self) -> Result<Vec<Box<dyn Tool>>> {
method available_tools (line 170) | async fn available_tools(&self) -> Result<Vec<Box<dyn Tool>>> {
method available_tools (line 177) | async fn available_tools(&self) -> Result<Vec<Box<dyn Tool>>> {
method eq (line 206) | fn eq(&self, other: &Self) -> bool {
function hash (line 212) | fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
FILE: swiftide-core/src/document.rs
type Document (line 15) | pub struct Document {
method fmt (line 52) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
method from (line 61) | fn from(value: T) -> Self {
method new (line 67) | pub fn new(content: impl Into<String>, metadata: Option<Metadata>) -> ...
method builder (line 74) | pub fn builder() -> DocumentBuilder {
method content (line 78) | pub fn content(&self) -> &str {
method metadata (line 82) | pub fn metadata(&self) -> &Metadata {
method bytes (line 86) | pub fn bytes(&self) -> &[u8] {
function from (line 22) | fn from(document: Document) -> Self {
function from (line 31) | fn from(document: &Document) -> Self {
method partial_cmp (line 40) | fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
method cmp (line 46) | fn cmp(&self, other: &Self) -> std::cmp::Ordering {
function test_document_creation (line 97) | fn test_document_creation() {
function test_document_default_metadata (line 107) | fn test_document_default_metadata() {
function test_document_from_str (line 116) | fn test_document_from_str() {
function test_document_partial_ord (line 125) | fn test_document_partial_ord() {
function test_document_ord (line 133) | fn test_document_ord() {
function test_document_debug (line 141) | fn test_document_debug() {
function test_document_to_json (line 152) | fn test_document_to_json() {
function test_document_ref_to_json (line 163) | fn test_document_ref_to_json() {
FILE: swiftide-core/src/indexing_decorators.rs
type BackoffConfiguration (line 18) | pub struct BackoffConfiguration {
method default (line 31) | fn default() -> Self {
type LanguageModelWithBackOff (line 42) | pub struct LanguageModelWithBackOff<P: Clone> {
function new (line 48) | pub fn new(client: P, config: BackoffConfiguration) -> Self {
function strategy (line 55) | pub(crate) fn strategy(&self) -> backoff::ExponentialBackoff {
method prompt (line 67) | async fn prompt(&self, prompt: Prompt) -> Result<String, LanguageModelEr...
method name (line 90) | fn name(&self) -> &'static str {
method embed (line 97) | async fn embed(&self, input: Vec<String>) -> Result<Embeddings, Language...
method name (line 101) | fn name(&self) -> &'static str {
method complete (line 108) | async fn complete(
method complete_stream (line 131) | async fn complete_stream(&self, request: &ChatCompletionRequest<'_>) -> ...
type MockSimplePrompt (line 166) | struct MockSimplePrompt {
type MockErrorType (line 173) | enum MockErrorType {
type MockChatCompletion (line 180) | struct MockChatCompletion {
method complete (line 188) | async fn complete(
method prompt (line 223) | async fn prompt(&self, _prompt: Prompt) -> Result<String, LanguageModelE...
method name (line 246) | fn name(&self) -> &'static str {
function test_language_model_with_backoff_retries_transient_errors (line 252) | async fn test_language_model_with_backoff_retries_transient_errors() {
function test_language_model_with_backoff_does_not_retry_permanent_errors (line 277) | async fn test_language_model_with_backoff_does_not_retry_permanent_error...
function test_language_model_with_backoff_does_not_retry_context_length_errors (line 306) | async fn test_language_model_with_backoff_does_not_retry_context_length_...
function test_language_model_with_backoff_retries_chat_completion_transient_errors (line 335) | async fn test_language_model_with_backoff_retries_chat_completion_transi...
function test_language_model_with_backoff_does_not_retry_chat_completion_permanent_errors (line 365) | async fn test_language_model_with_backoff_does_not_retry_chat_completion...
function test_language_model_with_backoff_does_not_retry_chat_completion_context_length_errors (line 396) | async fn test_language_model_with_backoff_does_not_retry_chat_completion...
FILE: swiftide-core/src/indexing_defaults.rs
type IndexingDefaults (line 6) | pub struct IndexingDefaults(Arc<IndexingDefaultsInner>);
method simple_prompt (line 14) | pub fn simple_prompt(&self) -> Option<&dyn SimplePrompt> {
method from_simple_prompt (line 18) | pub fn from_simple_prompt(simple_prompt: Box<dyn SimplePrompt>) -> Self {
type IndexingDefaultsInner (line 9) | pub struct IndexingDefaultsInner {
FILE: swiftide-core/src/indexing_stream.rs
type IndexingStream (line 21) | pub struct IndexingStream<T: Chunk> {
type Item (line 27) | type Item = Result<Node<T>>;
method poll_next (line 29) | fn poll_next(
function into (line 39) | fn into(self) -> IndexingStream<T> {
function into (line 45) | fn into(self) -> IndexingStream<T> {
function into (line 57) | fn into(self) -> IndexingStream<T> {
function into (line 66) | fn into(self) -> IndexingStream<T> {
function into (line 72) | fn into(self) -> IndexingStream<T> {
function from (line 80) | fn from(err: anyhow::Error) -> Self {
function empty (line 86) | pub fn empty() -> Self {
function iter (line 96) | pub fn iter<I>(iter: I) -> Self
function from_nodes (line 106) | pub fn from_nodes(nodes: Vec<Node<T>>) -> Self {
FILE: swiftide-core/src/indexing_traits.rs
type Transformer (line 29) | pub trait Transformer: Send + Sync + DynClone {
method transform_node (line 33) | async fn transform_node(&self, node: Node<Self::Input>) -> Result<Node...
method concurrency (line 36) | fn concurrency(&self) -> Option<usize> {
method name (line 40) | fn name(&self) -> &'static str {
type Input (line 70) | type Input = I;
type Output (line 71) | type Output = O;
method transform_node (line 73) | async fn transform_node(&self, node: Node<Self::Input>) -> Result<Node...
method concurrency (line 76) | fn concurrency(&self) -> Option<usize> {
method name (line 79) | fn name(&self) -> &'static str {
type Input (line 86) | type Input = I;
type Output (line 87) | type Output = O;
method transform_node (line 89) | async fn transform_node(&self, node: Node<Self::Input>) -> Result<Node...
method concurrency (line 92) | fn concurrency(&self) -> Option<usize> {
method name (line 95) | fn name(&self) -> &'static str {
type Input (line 102) | type Input = I;
type Output (line 103) | type Output = O;
method transform_node (line 105) | async fn transform_node(&self, node: Node<Self::Input>) -> Result<Node...
method concurrency (line 108) | fn concurrency(&self) -> Option<usize> {
type Input (line 120) | type Input = String;
type Output (line 121) | type Output = String;
method transform_node (line 123) | async fn transform_node(&self, node: Node<Self::Input>) -> Result<Node...
type BatchableTransformer (line 130) | pub trait BatchableTransformer: Send + Sync + DynClone {
method batch_transform (line 135) | async fn batch_transform(&self, nodes: Vec<Node<Self::Input>>) -> Inde...
method concurrency (line 138) | fn concurrency(&self) -> Option<usize> {
method name (line 142) | fn name(&self) -> &'static str {
method batch_size (line 148) | fn batch_size(&self) -> Option<usize> {
type Input (line 181) | type Input = String;
type Output (line 182) | type Output = String;
method batch_transform (line 184) | async fn batch_transform(&self, nodes: Vec<Node<String>>) -> IndexingS...
type Input (line 193) | type Input = I;
type Output (line 194) | type Output = O;
method batch_transform (line 196) | async fn batch_transform(&self, nodes: Vec<Node<Self::Input>>) -> Inde...
method concurrency (line 199) | fn concurrency(&self) -> Option<usize> {
method name (line 202) | fn name(&self) -> &'static str {
type Input (line 211) | type Input = I;
type Output (line 212) | type Output = O;
method batch_transform (line 214) | async fn batch_transform(&self, nodes: Vec<Node<Self::Input>>) -> Inde...
method concurrency (line 217) | fn concurrency(&self) -> Option<usize> {
method name (line 220) | fn name(&self) -> &'static str {
type Input (line 227) | type Input = I;
type Output (line 228) | type Output = O;
method batch_transform (line 230) | async fn batch_transform(&self, nodes: Vec<Node<Self::Input>>) -> Inde...
method concurrency (line 233) | fn concurrency(&self) -> Option<usize> {
type Loader (line 239) | pub trait Loader: DynClone + Send + Sync {
method into_stream (line 242) | fn into_stream(self) -> IndexingStream<Self::Output>;
method into_stream_boxed (line 255) | fn into_stream_boxed(self: Box<Self>) -> IndexingStream<Self::Output> {
method name (line 261) | fn name(&self) -> &'static str {
type Output (line 289) | type Output = O;
method into_stream (line 291) | fn into_stream(self) -> IndexingStream<Self::Output> {
method into_stream_boxed (line 295) | fn into_stream_boxed(self: Box<Self>) -> IndexingStream<Self::Output> {
method name (line 298) | fn name(&self) -> &'static str {
type Output (line 304) | type Output = O;
method into_stream (line 306) | fn into_stream(self) -> IndexingStream<Self::Output> {
method into_stream_boxed (line 310) | fn into_stream_boxed(self: Box<Self>) -> IndexingStream<Self::Output> {
type ChunkerTransformer (line 317) | pub trait ChunkerTransformer: Send + Sync + DynClone {
method transform_node (line 321) | async fn transform_node(&self, node: Node<Self::Input>) -> IndexingStr...
method concurrency (line 324) | fn concurrency(&self) -> Option<usize> {
method name (line 328) | fn name(&self) -> &'static str {
type Input (line 357) | type Input = I;
type Output (line 358) | type Output = O;
method transform_node (line 360) | async fn transform_node(&self, node: Node<I>) -> IndexingStream<O> {
method concurrency (line 363) | fn concurrency(&self) -> Option<usize> {
method name (line 366) | fn name(&self) -> &'static str {
type Input (line 373) | type Input = I;
type Output (line 374) | type Output = O;
method transform_node (line 376) | async fn transform_node(&self, node: Node<I>) -> IndexingStream<O> {
method concurrency (line 379) | fn concurrency(&self) -> Option<usize> {
method name (line 382) | fn name(&self) -> &'static str {
type Input (line 389) | type Input = I;
type Output (line 390) | type Output = O;
method transform_node (line 392) | async fn transform_node(&self, node: Node<I>) -> IndexingStream<O> {
method concurrency (line 395) | fn concurrency(&self) -> Option<usize> {
method transform_node (line 405) | async fn transform_node(&self, node: Node<String>) -> IndexingStream<S...
type Input (line 409) | type Input = String;
type Output (line 411) | type Output = String;
type NodeCache (line 419) | pub trait NodeCache: Send + Sync + Debug + DynClone {
method get (line 422) | async fn get(&self, node: &Node<Self::Input>) -> bool;
method set (line 423) | async fn set(&self, node: &Node<Self::Input>);
method clear (line 426) | async fn clear(&self) -> Result<()> {
method name (line 430) | fn name(&self) -> &'static str {
type Input (line 460) | type Input = T;
method get (line 462) | async fn get(&self, node: &Node<T>) -> bool {
method set (line 465) | async fn set(&self, node: &Node<T>) {
method clear (line 468) | async fn clear(&self) -> Result<()> {
method name (line 471) | fn name(&self) -> &'static str {
type Input (line 478) | type Input = T;
method get (line 479) | async fn get(&self, node: &Node<T>) -> bool {
method set (line 482) | async fn set(&self, node: &Node<T>) {
method clear (line 485) | async fn clear(&self) -> Result<()> {
method name (line 488) | fn name(&self) -> &'static str {
type Input (line 495) | type Input = T;
method get (line 496) | async fn get(&self, node: &Node<T>) -> bool {
method set (line 499) | async fn set(&self, node: &Node<T>) {
method clear (line 502) | async fn clear(&self) -> Result<()> {
type EmbeddingModel (line 510) | pub trait EmbeddingModel: Send + Sync + Debug + DynClone {
method embed (line 511) | async fn embed(&self, input: Vec<String>) -> Result<Embeddings, Langua...
method name (line 513) | fn name(&self) -> &'static str {
method embed (line 539) | async fn embed(&self, input: Vec<String>) -> Result<Embeddings, Langua...
method name (line 543) | fn name(&self) -> &'static str {
method embed (line 550) | async fn embed(&self, input: Vec<String>) -> Result<Embeddings, Langua...
method name (line 554) | fn name(&self) -> &'static str {
method embed (line 561) | async fn embed(&self, input: Vec<String>) -> Result<Embeddings, Langua...
type SparseEmbeddingModel (line 569) | pub trait SparseEmbeddingModel: Send + Sync + Debug + DynClone {
method sparse_embed (line 570) | async fn sparse_embed(
method name (line 575) | fn name(&self) -> &'static str {
method sparse_embed (line 601) | async fn sparse_embed(
method name (line 608) | fn name(&self) -> &'static str {
method sparse_embed (line 615) | async fn sparse_embed(
method name (line 622) | fn name(&self) -> &'static str {
method sparse_embed (line 629) | async fn sparse_embed(
type SimplePrompt (line 639) | pub trait SimplePrompt: Debug + Send + Sync + DynClone {
method prompt (line 641) | async fn prompt(&self, prompt: Prompt) -> Result<String, LanguageModel...
method name (line 643) | fn name(&self) -> &'static str {
method prompt (line 669) | async fn prompt(&self, prompt: Prompt) -> Result<String, LanguageModel...
method name (line 673) | fn name(&self) -> &'static str {
method prompt (line 680) | async fn prompt(&self, prompt: Prompt) -> Result<String, LanguageModel...
method name (line 684) | fn name(&self) -> &'static str {
method prompt (line 691) | async fn prompt(&self, prompt: Prompt) -> Result<String, LanguageModel...
type Persist (line 698) | pub trait Persist: Debug + Send + Sync + DynClone {
method setup (line 702) | async fn setup(&self) -> Result<()>;
method store (line 703) | async fn store(&self, node: Node<Self::Input>) -> Result<Node<Self::Ou...
method batch_store (line 704) | async fn batch_store(&self, nodes: Vec<Node<Self::Input>>) -> Indexing...
method batch_size (line 705) | fn batch_size(&self) -> Option<usize> {
method name (line 709) | fn name(&self) -> &'static str {
type Input (line 742) | type Input = I;
type Output (line 743) | type Output = O;
method setup (line 745) | async fn setup(&self) -> Result<()> {
method store (line 748) | async fn store(&self, node: Node<I>) -> Result<Node<O>> {
method batch_store (line 751) | async fn batch_store(&self, nodes: Vec<Node<I>>) -> IndexingStream<O> {
method batch_size (line 754) | fn batch_size(&self) -> Option<usize> {
method name (line 757) | fn name(&self) -> &'static str {
type Input (line 764) | type Input = I;
type Output (line 765) | type Output = O;
method setup (line 767) | async fn setup(&self) -> Result<()> {
method store (line 770) | async fn store(&self, node: Node<I>) -> Result<Node<O>> {
method batch_store (line 773) | async fn batch_store(&self, nodes: Vec<Node<I>>) -> IndexingStream<O> {
method batch_size (line 776) | fn batch_size(&self) -> Option<usize> {
method name (line 779) | fn name(&self) -> &'static str {
type Input (line 786) | type Input = I;
type Output (line 787) | type Output = O;
method setup (line 789) | async fn setup(&self) -> Result<()> {
method store (line 792) | async fn store(&self, node: Node<I>) -> Result<Node<O>> {
method batch_store (line 795) | async fn batch_store(&self, nodes: Vec<Node<I>>) -> IndexingStream<O> {
method batch_size (line 798) | fn batch_size(&self) -> Option<usize> {
type WithIndexingDefaults (line 805) | pub trait WithIndexingDefaults {
method with_indexing_defaults (line 806) | fn with_indexing_defaults(&mut self, _indexing_defaults: IndexingDefau...
method with_indexing_defaults (line 817) | fn with_indexing_defaults(&mut self, indexing_defaults: IndexingDefaul...
type WithBatchIndexingDefaults (line 811) | pub trait WithBatchIndexingDefaults {
method with_indexing_defaults (line 812) | fn with_indexing_defaults(&mut self, _indexing_defaults: IndexingDefau...
method with_indexing_defaults (line 823) | fn with_indexing_defaults(&mut self, indexing_defaults: IndexingDefaul...
type StructuredPrompt (line 839) | pub trait StructuredPrompt: Debug + Send + Sync + DynClone {
method structured_prompt (line 840) | async fn structured_prompt<T: DeserializeOwned + JsonSchema>(
method name (line 845) | fn name(&self) -> &'static str {
method structured_prompt (line 876) | async fn structured_prompt<T: DeserializeOwned + JsonSchema>(
type DynStructuredPrompt (line 856) | pub trait DynStructuredPrompt: Debug + Send + Sync + DynClone {
method structured_prompt_dyn (line 857) | async fn structured_prompt_dyn(
method name (line 863) | fn name(&self) -> &'static str {
FILE: swiftide-core/src/metadata.rs
type Metadata (line 13) | pub struct Metadata {
method fmt (line 18) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method iter (line 37) | pub fn iter(&self) -> impl Iterator<Item = (&String, &serde_json::Valu...
method insert (line 41) | pub fn insert<K, V>(&mut self, key: K, value: V)
method get (line 49) | pub fn get(&self, key: impl AsRef<str>) -> Option<&serde_json::Value> {
method into_values (line 53) | pub fn into_values(self) -> IntoValues<String, serde_json::Value> {
method keys (line 57) | pub fn keys(&self) -> impl Iterator<Item = &str> {
method values (line 61) | pub fn values(&self) -> impl Iterator<Item = &serde_json::Value> {
method is_empty (line 65) | pub fn is_empty(&self) -> bool {
method extend (line 75) | fn extend<T: IntoIterator<Item = (K, V)>>(&mut self, iter: T) {
method from (line 86) | fn from(items: Vec<(K, V)>) -> Self {
method from (line 100) | fn from(items: (K, V)) -> Self {
method from (line 115) | fn from(items: &'a [(K, V)]) -> Self {
method from (line 130) | fn from(mut arr: [(K, V); N]) -> Self {
method deserialize (line 160) | fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, ...
method serialize (line 166) | fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::...
type Item (line 144) | type Item = (String, serde_json::Value);
type IntoIter (line 145) | type IntoIter = std::collections::btree_map::IntoIter<String, serde_json...
method into_iter (line 146) | fn into_iter(self) -> Self::IntoIter {
type Item (line 152) | type Item = (&'iter String, &'iter serde_json::Value);
type IntoIter (line 153) | type IntoIter = std::collections::btree_map::Iter<'iter, String, serde_j...
method into_iter (line 154) | fn into_iter(self) -> Self::IntoIter {
function test_insert_and_get (line 177) | fn test_insert_and_get() {
function test_iter (line 187) | fn test_iter() {
function test_extend (line 199) | fn test_extend() {
function test_from_vec (line 208) | fn test_from_vec() {
function test_into_values (line 216) | fn test_into_values() {
FILE: swiftide-core/src/metrics.rs
function lazy_init (line 8) | pub fn lazy_init() {
function emit_usage (line 21) | pub fn emit_usage(
FILE: swiftide-core/src/node.rs
type Chunk (line 39) | pub trait Chunk: Clone + Send + Sync + Debug + AsRef<[u8]> + 'static {}
type Node (line 49) | pub struct Node<T: Chunk> {
type TextNode (line 76) | pub type TextNode = Node<String>;
function maybe_sparse_vectors (line 79) | pub fn maybe_sparse_vectors(
function maybe_vectors (line 87) | pub fn maybe_vectors(
method fmt (line 101) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
function build_from_other (line 139) | pub fn build_from_other(node: &Node<T>) -> NodeBuilder<T> {
function builder (line 153) | pub fn builder<VALUE: Chunk + Clone>() -> NodeBuilder<VALUE> {
function new (line 160) | pub fn new(chunk: impl Into<String>) -> Node<String> {
function with_metadata (line 170) | pub fn with_metadata(&mut self, metadata: impl Into<Metadata>) -> &mut S...
function with_vectors (line 175) | pub fn with_vectors(
function with_sparse_vectors (line 183) | pub fn with_sparse_vectors(
function id (line 197) | pub fn id(&self) -> uuid::Uuid {
function as_embeddables (line 211) | pub fn as_embeddables(&self) -> Vec<(EmbeddedField, String)> {
function combine_chunk_with_metadata (line 240) | fn combine_chunk_with_metadata(&self) -> String {
method hash (line 263) | fn hash<H: Hasher>(&self, state: &mut H) {
function from (line 270) | fn from(value: T) -> Self {
type EmbedMode (line 278) | pub enum EmbedMode {
type EmbeddedField (line 293) | pub enum EmbeddedField {
method sparse_field_name (line 307) | pub fn sparse_field_name(&self) -> String {
method field_name (line 312) | pub fn field_name(&self) -> String {
method into (line 319) | fn into(self) -> String {
function field_name_tests (line 332) | fn field_name_tests(embedded_field: &EmbeddedField, expected: [&str; 2]) {
function test_debugging_node_with_utf8_char_boundary (line 338) | fn test_debugging_node_with_utf8_char_boundary() {
function test_build_from_other_without_vectors (line 349) | fn test_build_from_other_without_vectors() {
function test_build_from_other_with_vectors (line 363) | fn test_build_from_other_with_vectors() {
FILE: swiftide-core/src/prompt.rs
type Prompt (line 45) | pub struct Prompt {
method extend (line 72) | pub fn extend(other: &Tera) -> Result<()> {
method from_compiled_template (line 79) | pub fn from_compiled_template(name: impl Into<Cow<'static, str>>) -> P...
method with_node (line 88) | pub fn with_node(mut self, node: &TextNode) -> Self {
method with_context (line 96) | pub fn with_context(mut self, new_context: impl Into<tera::Context>) -...
method with_context_value (line 105) | pub fn with_context_value(mut self, key: &str, value: impl Into<tera::...
method render (line 122) | pub fn render(&self) -> Result<String> {
method from (line 149) | fn from(prompt: &'static str) -> Self {
method from (line 158) | fn from(prompt: String) -> Self {
type TemplateRef (line 53) | enum TemplateRef {
function test_prompt (line 173) | async fn test_prompt() {
function test_prompt_with_node (line 180) | async fn test_prompt_with_node() {
function test_one_off_from_string (line 188) | async fn test_one_off_from_string() {
function test_extending_with_custom_repository (line 196) | async fn test_extending_with_custom_repository() {
function test_coercion_to_prompt (line 212) | async fn test_coercion_to_prompt() {
function test_assume_rendered_unless_context_methods_called (line 236) | async fn test_assume_rendered_unless_context_methods_called() {
FILE: swiftide-core/src/query.rs
type Query (line 21) | pub struct Query<STATE: QueryState> {
function fmt (line 45) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
function builder (line 64) | pub fn builder() -> QueryBuilder<STATE> {
function original (line 69) | pub fn original(&self) -> &str {
function current (line 74) | pub fn current(&self) -> &str {
function transition_to (line 78) | fn transition_to<NEWSTATE: QueryState>(self, new_state: NEWSTATE) -> Que...
function history (line 91) | pub fn history(&self) -> &Vec<TransformationEvent> {
function documents (line 96) | pub fn documents(&self) -> &[Document] {
function documents_mut (line 101) | pub fn documents_mut(&mut self) -> &mut Vec<Document> {
function retrieved_documents (line 108) | pub fn retrieved_documents(mut self, documents: Vec<Document>) -> Query<...
function new (line 124) | pub fn new(query: impl Into<String>) -> Self {
function transformed_query (line 132) | pub fn transformed_query(&mut self, new_query: impl Into<String>) {
function new (line 146) | pub fn new() -> Self {
function transformed_response (line 151) | pub fn transformed_response(&mut self, new_response: impl Into<String>) {
function answered (line 165) | pub fn answered(mut self, answer: impl Into<String>) -> Query<states::An...
function new (line 173) | pub fn new() -> Self {
function answer (line 178) | pub fn answer(&self) -> &str {
type QueryState (line 184) | pub trait QueryState: Send + Sync + Default {}
type CanRetrieve (line 186) | pub trait CanRetrieve: QueryState {}
type Pending (line 194) | pub struct Pending;
type Retrieved (line 198) | pub struct Retrieved;
type Answered (line 202) | pub struct Answered;
function from (line 213) | fn from(original: T) -> Self {
type TransformationEvent (line 225) | pub enum TransformationEvent {
method is_retrieval (line 239) | pub fn is_retrieval(&self) -> bool {
method is_transformation (line 244) | pub fn is_transformation(&self) -> bool {
method before (line 249) | pub fn before(&self) -> &str {
method after (line 257) | pub fn after(&self) -> &str {
method documents (line 265) | pub fn documents(&self) -> Option<&[Document]> {
method fmt (line 274) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
function test_query_initial_state (line 306) | fn test_query_initial_state() {
function test_query_transformed_query (line 314) | fn test_query_transformed_query() {
function test_query_retrieved_documents (line 328) | fn test_query_retrieved_documents() {
function test_query_transformed_response (line 349) | fn test_query_transformed_response() {
function test_query_answered (line 368) | fn test_query_answered() {
FILE: swiftide-core/src/query_evaluation.rs
type QueryEvaluation (line 4) | pub enum QueryEvaluation {
method fmt (line 12) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method from (line 23) | fn from(val: Query<states::Retrieved>) -> Self {
method from (line 29) | fn from(val: Query<states::Answered>) -> Self {
method retrieve_documents_query (line 36) | pub fn retrieve_documents_query(self) -> Option<Query<states::Retrieve...
method answer_query (line 44) | pub fn answer_query(self) -> Option<Query<states::Answered>> {
function test_from_retrieved (line 58) | fn test_from_retrieved() {
function test_from_answered (line 69) | fn test_from_answered() {
function test_retrieve_documents_query (line 80) | fn test_retrieve_documents_query() {
function test_answer_query (line 91) | fn test_answer_query() {
FILE: swiftide-core/src/query_stream.rs
type QueryStream (line 18) | pub struct QueryStream<'stream, STATE: 'stream + QueryState> {
method default (line 27) | fn default() -> Self {
type Item (line 38) | type Item = Result<Query<STATE>>;
method poll_next (line 40) | fn poll_next(
function from (line 52) | fn from(val: Pin<Box<dyn Stream<Item = Result<Query<STATE>>> + Send>>) -...
FILE: swiftide-core/src/query_traits.rs
type TransformQuery (line 20) | pub trait TransformQuery: Send + Sync + DynClone {
method transform_query (line 21) | async fn transform_query(
method name (line 26) | fn name(&self) -> &'static str {
method transform_query (line 58) | async fn transform_query(
method transform_query (line 68) | async fn transform_query(
method name (line 75) | fn name(&self) -> &'static str {
method transform_query (line 82) | async fn transform_query(
method name (line 89) | fn name(&self) -> &'static str {
type SearchStrategy (line 95) | pub trait SearchStrategy: Clone + Send + Sync + Default {}
type Retrieve (line 99) | pub trait Retrieve<S: SearchStrategy>: Send + Sync + DynClone {
method retrieve (line 100) | async fn retrieve(
method name (line 106) | fn name(&self) -> &'static str {
function retrieve (line 116) | async fn retrieve(
function name (line 124) | fn name(&self) -> &'static str {
function retrieve (line 131) | async fn retrieve(
function name (line 139) | fn name(&self) -> &'static str {
method retrieve (line 150) | async fn retrieve(
type TransformResponse (line 161) | pub trait TransformResponse: Send + Sync + DynClone {
method transform_response (line 162) | async fn transform_response(&self, query: Query<Retrieved>)
method name (line 165) | fn name(&self) -> &'static str {
method transform_response (line 194) | async fn transform_response(&self, query: Query<Retrieved>) -> Result<...
method transform_response (line 201) | async fn transform_response(&self, query: Query<Retrieved>) -> Result<...
method name (line 205) | fn name(&self) -> &'static str {
method transform_response (line 212) | async fn transform_response(&self, query: Query<Retrieved>) -> Result<...
method name (line 216) | fn name(&self) -> &'static str {
type Answer (line 223) | pub trait Answer: Send + Sync + DynClone {
method answer (line 224) | async fn answer(&self, query: Query<states::Retrieved>) -> Result<Quer...
method name (line 226) | fn name(&self) -> &'static str {
method answer (line 254) | async fn answer(&self, query: Query<Retrieved>) -> Result<Query<states...
method answer (line 261) | async fn answer(&self, query: Query<Retrieved>) -> Result<Query<states...
method name (line 265) | fn name(&self) -> &'static str {
method answer (line 272) | async fn answer(&self, query: Query<Retrieved>) -> Result<Query<states...
method name (line 276) | fn name(&self) -> &'static str {
type EvaluateQuery (line 285) | pub trait EvaluateQuery: Send + Sync + DynClone {
method evaluate (line 286) | async fn evaluate(&self, evaluation: QueryEvaluation) -> Result<()>;
method evaluate (line 307) | async fn evaluate(&self, evaluation: QueryEvaluation) -> Result<()> {
method evaluate (line 314) | async fn evaluate(&self, evaluation: QueryEvaluation) -> Result<()> {
FILE: swiftide-core/src/search_strategies/custom_strategy.rs
type QueryGenerator (line 14) | type QueryGenerator<Q> = Arc<dyn Fn(&Query<states::Pending>) -> Result<Q...
type AsyncQueryGenerator (line 17) | type AsyncQueryGenerator<Q> = Arc<
type CustomStrategy (line 25) | pub struct CustomStrategy<Q> {
method default (line 34) | fn default() -> Self {
method clone (line 44) | fn clone(&self) -> Self {
function from_query (line 55) | pub fn from_query(
function from_async_query (line 66) | pub fn from_async_query<F>(
function build_query (line 86) | pub async fn build_query(&self, query_node: &Query<states::Pending>) -> ...
FILE: swiftide-core/src/search_strategies/hybrid_search.rs
type HybridSearch (line 13) | pub struct HybridSearch<FILTER: SearchFilter = ()> {
method default (line 37) | fn default() -> Self {
function from_filter (line 50) | pub fn from_filter(filter: FILTER) -> Self {
function with_filter (line 57) | pub fn with_filter<NEWFILTER: SearchFilter>(
function with_top_k (line 71) | pub fn with_top_k(&mut self, top_k: u64) -> &mut Self {
function top_k (line 76) | pub fn top_k(&self) -> u64 {
function with_top_n (line 81) | pub fn with_top_n(&mut self, top_n: u64) -> &mut Self {
function top_n (line 86) | pub fn top_n(&self) -> u64 {
function with_dense_vector_field (line 92) | pub fn with_dense_vector_field(
function dense_vector_field (line 101) | pub fn dense_vector_field(&self) -> &EmbeddedField {
function with_sparse_vector_field (line 107) | pub fn with_sparse_vector_field(
function sparse_vector_field (line 116) | pub fn sparse_vector_field(&self) -> &EmbeddedField {
function filter (line 120) | pub fn filter(&self) -> Option<&FILTER> {
FILE: swiftide-core/src/search_strategies/mod.rs
constant DEFAULT_TOP_K (line 10) | pub(crate) const DEFAULT_TOP_K: u64 = 10;
constant DEFAULT_TOP_N (line 11) | pub(crate) const DEFAULT_TOP_N: u64 = 10;
type SearchFilter (line 17) | pub trait SearchFilter: Clone + Sync + Send {}
FILE: swiftide-core/src/search_strategies/similarity_single_embedding.rs
type SimilaritySingleEmbedding (line 10) | pub struct SimilaritySingleEmbedding<FILTER: SearchFilter = ()> {
method default (line 20) | fn default() -> Self {
function into_concrete_filter (line 30) | pub fn into_concrete_filter<FILTER: SearchFilter>(&self) -> SimilaritySi...
function from_filter (line 39) | pub fn from_filter(filter: FILTER) -> Self {
function with_top_k (line 47) | pub fn with_top_k(&mut self, top_k: u64) -> &mut Self {
function top_k (line 54) | pub fn top_k(&self) -> u64 {
function with_filter (line 59) | pub fn with_filter<NEWFILTER: SearchFilter>(
function filter (line 69) | pub fn filter(&self) -> &Option<FILTER> {
FILE: swiftide-core/src/statistics.rs
constant TWO_POW_32_F64 (line 32) | const TWO_POW_32_F64: f64 = 4_294_967_296.0;
function lock_recover (line 34) | fn lock_recover<T>(mutex: &Mutex<T>) -> MutexGuard<'_, T> {
function u64_to_f64 (line 40) | fn u64_to_f64(value: u64) -> f64 {
type ModelUsage (line 50) | pub struct ModelUsage {
method new (line 64) | pub fn new() -> Self {
method record (line 69) | pub fn record(&mut self, prompt_tokens: u64, completion_tokens: u64) {
type PipelineStats (line 81) | pub struct PipelineStats {
method new (line 101) | pub fn new() -> Self {
method duration (line 110) | pub fn duration(&self) -> Option<Duration> {
method nodes_per_second (line 122) | pub fn nodes_per_second(&self) -> Option<f64> {
method total_tokens (line 132) | pub fn total_tokens(&self) -> u64 {
method total_requests (line 138) | pub fn total_requests(&self) -> u64 {
method total_prompt_tokens (line 144) | pub fn total_prompt_tokens(&self) -> u64 {
method total_completion_tokens (line 150) | pub fn total_completion_tokens(&self) -> u64 {
type StatsCollector (line 160) | pub struct StatsCollector {
method new (line 179) | pub fn new() -> Self {
method start (line 192) | pub fn start(&self) {
method complete (line 198) | pub fn complete(&self) {
method increment_nodes_processed (line 204) | pub fn increment_nodes_processed(&self, count: u64) {
method increment_nodes_failed (line 209) | pub fn increment_nodes_failed(&self, count: u64) {
method increment_nodes_stored (line 214) | pub fn increment_nodes_stored(&self, count: u64) {
method increment_transformations (line 219) | pub fn increment_transformations(&self, count: u64) {
method record_token_usage (line 233) | pub fn record_token_usage(
method get_stats (line 246) | pub fn get_stats(&self) -> PipelineStats {
method default (line 171) | fn default() -> Self {
method clone (line 260) | fn clone(&self) -> Self {
function test_stats_collector (line 280) | fn test_stats_collector() {
function test_model_usage (line 303) | fn test_model_usage() {
function test_record_token_usage (line 316) | fn test_record_token_usage() {
function test_empty_stats (line 337) | fn test_empty_stats() {
function test_stats_collector_clone (line 348) | fn test_stats_collector_clone() {
function test_pipeline_stats_duration_while_running (line 368) | fn test_pipeline_stats_duration_while_running() {
FILE: swiftide-core/src/stream_backoff.rs
type TokioSleeper (line 21) | pub(crate) struct TokioSleeper;
type Sleep (line 23) | type Sleep = ::tokio::time::Sleep;
method sleep (line 24) | fn sleep(&self, dur: Duration) -> Self::Sleep {
type StreamBackoff (line 31) | pub struct StreamBackoff<S, B, Sl: Sleeper> {
type State (line 41) | enum State<Sl: Sleeper> {
function new (line 51) | pub fn new(stream: S, backoff: B, sleeper: Sl) -> Self {
type Item (line 65) | type Item = Result<S::Ok, S::Error>;
method poll_next (line 67) | fn poll_next(
function stream_should_back_off (line 132) | async fn stream_should_back_off() {
function backoff_time_should_update (line 149) | async fn backoff_time_should_update() {
function backoff_should_close_when_requested (line 178) | async fn backoff_should_close_when_requested() {
type LinearBackoff (line 192) | struct LinearBackoff {
method new (line 198) | fn new(interval: Duration) -> Self {
method next_backoff (line 207) | fn next_backoff(&mut self) -> Option<Duration> {
method reset (line 212) | fn reset(&mut self) {
FILE: swiftide-core/src/test_utils.rs
type Expectations (line 41) | type Expectations = Arc<
type MockChatCompletion (line 51) | pub struct MockChatCompletion {
method new (line 63) | pub fn new() -> Self {
method expect_complete (line 70) | pub fn expect_complete(
method default (line 57) | fn default() -> Self {
method complete (line 83) | async fn complete(
method complete_stream (line 138) | async fn complete_stream(&self, request: &ChatCompletionRequest<'_>) -> ...
method drop (line 168) | fn drop(&mut self) {
function pretty_expectation (line 203) | fn pretty_expectation(
function pretty_request (line 226) | fn pretty_request(request: &ChatCompletionRequest<'_>) -> String {
function pretty_response (line 234) | fn pretty_response(response: &ChatCompletionResponse) -> String {
FILE: swiftide-core/src/token_estimation.rs
type EstimateTokens (line 28) | pub trait EstimateTokens {
method estimate (line 29) | async fn estimate(&self, value: impl Estimatable) -> Result<usize>;
method estimate (line 52) | async fn estimate(&self, value: impl Estimatable) -> Result<usize> {
type CharEstimator (line 48) | pub struct CharEstimator;
type Estimatable (line 81) | pub trait Estimatable: Send + Sync {
method for_estimate (line 87) | fn for_estimate(&self) -> Result<Vec<Cow<'_, str>>>;
method additional_tokens (line 90) | fn additional_tokens(&self) -> usize {
method for_estimate (line 96) | fn for_estimate(&self) -> Result<Vec<Cow<'_, str>>> {
method for_estimate (line 102) | fn for_estimate(&self) -> Result<Vec<Cow<'_, str>>> {
method for_estimate (line 108) | fn for_estimate(&self) -> Result<Vec<Cow<'_, str>>> {
method for_estimate (line 115) | fn for_estimate(&self) -> Result<Vec<Cow<'_, str>>> {
method additional_tokens (line 168) | fn additional_tokens(&self) -> usize {
method for_estimate (line 174) | fn for_estimate(&self) -> Result<Vec<Cow<'_, str>>> {
method additional_tokens (line 190) | fn additional_tokens(&self) -> usize {
function estimate_counts_characters_and_additional_tokens (line 201) | async fn estimate_counts_characters_and_additional_tokens() {
function estimate_prompt_renders_before_counting (line 208) | async fn estimate_prompt_renders_before_counting() {
function estimate_chat_message_includes_role_tokens (line 216) | async fn estimate_chat_message_includes_role_tokens() {
function estimate_slice_adds_reply_priming_tokens (line 224) | async fn estimate_slice_adds_reply_priming_tokens() {
function assistant_tool_calls_are_included_in_estimate (line 237) | async fn assistant_tool_calls_are_included_in_estimate() {
function assistant_without_content_or_tools_uses_none_marker (line 252) | async fn assistant_without_content_or_tools_uses_none_marker() {
FILE: swiftide-core/src/type_aliases.rs
type Embedding (line 5) | pub type Embedding = Vec<f32>;
type Embeddings (line 6) | pub type Embeddings = Vec<Embedding>;
type SparseEmbedding (line 9) | pub struct SparseEmbedding {
method fmt (line 16) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type SparseEmbeddings (line 13) | pub type SparseEmbeddings = Vec<SparseEmbedding>;
FILE: swiftide-core/src/util.rs
function safe_truncate_utf8 (line 6) | pub fn safe_truncate_utf8(s: impl AsRef<str>, max_chars: usize) -> String {
function debug_long_utf8 (line 24) | pub fn debug_long_utf8(s: impl AsRef<str>, max_chars: usize) -> String {
function test_safe_truncate_str_with_utf8_char_boundary (line 39) | fn test_safe_truncate_str_with_utf8_char_boundary() {
FILE: swiftide-indexing/src/loaders/file_loader.rs
type FileLoader (line 25) | pub struct FileLoader {
method new (line 40) | pub fn new(root: impl AsRef<Path>) -> Self {
method with_extensions (line 57) | pub fn with_extensions(mut self, extensions: &[impl AsRef<str>]) -> Se...
method list_nodes (line 72) | pub fn list_nodes(&self) -> Vec<TextNode> {
method iter (line 77) | pub fn iter(&self) -> impl Iterator<Item = anyhow::Result<TextNode>> +...
type Iter (line 85) | struct Iter {
method new (line 118) | fn new(root: &Path, include_extensions: Option<Vec<String>>) -> Self {
method load (line 129) | fn load(&self, entry: &DirEntry) -> Option<anyhow::Result<TextNode>> {
type Item (line 95) | type Item = anyhow::Result<TextNode>;
method next (line 97) | fn next(&mut self) -> Option<Self::Item> {
function read_node (line 159) | fn read_node(entry: &DirEntry) -> anyhow::Result<TextNode> {
type Output (line 177) | type Output = String;
method into_stream (line 187) | fn into_stream(self) -> IndexingStream<String> {
method into_stream_boxed (line 191) | fn into_stream_boxed(self: Box<Self>) -> IndexingStream<String> {
function test_with_extensions (line 204) | fn test_with_extensions() {
function test_ignores_invalid_utf8 (line 210) | async fn test_ignores_invalid_utf8() {
FILE: swiftide-indexing/src/persist/memory_storage.rs
type MemoryStorage (line 27) | pub struct MemoryStorage<T: Chunk = String> {
function key (line 36) | fn key(&self) -> String {
function get (line 41) | pub async fn get(&self, key: impl AsRef<str>) -> Option<Node<T>> {
function get_all_values (line 46) | pub async fn get_all_values(&self) -> Vec<Node<T>> {
function get_all (line 51) | pub async fn get_all(&self) -> Vec<(String, Node<T>)> {
type Input (line 63) | type Input = T;
type Output (line 64) | type Output = T;
method setup (line 65) | async fn setup(&self) -> Result<()> {
method store (line 72) | async fn store(&self, node: Node<T>) -> Result<Node<T>> {
method batch_store (line 81) | async fn batch_store(&self, nodes: Vec<Node<T>>) -> IndexingStream<T> {
method batch_size (line 91) | fn batch_size(&self) -> Option<usize> {
function test_memory_storage (line 103) | async fn test_memory_storage() {
function test_inserting_multiple_nodes (line 111) | async fn test_inserting_multiple_nodes() {
function test_batch_store (line 125) | async fn test_batch_store() {
FILE: swiftide-indexing/src/pipeline.rs
constant DEFAULT_BATCH_SIZE (line 60) | const DEFAULT_BATCH_SIZE: usize = 256;
type Pipeline (line 75) | pub struct Pipeline<T: Chunk> {
type DynStorageSetupFn (line 85) | type DynStorageSetupFn =
method default (line 91) | fn default() -> Self {
function from_loader (line 113) | pub fn from_loader(loader: impl Loader<Output = T> + 'static) -> Self {
function with_default_llm_client (line 124) | pub fn with_default_llm_client(mut self, client: impl SimplePrompt + 'st...
function from_stream (line 138) | pub fn from_stream(stream: impl Into<IndexingStream<T>>) -> Self {
function with_concurrency (line 156) | pub fn with_concurrency(mut self, concurrency: usize) -> Self {
function with_embed_mode (line 174) | pub fn with_embed_mode(mut self, embed_mode: EmbedMode) -> Self {
function filter_cached (line 196) | pub fn filter_cached(mut self, cache: impl NodeCache<Input = T> + 'stati...
function then (line 233) | pub fn then<Output: Chunk>(
function then_in_batch (line 277) | pub fn then_in_batch<Output: Chunk>(
function then_chunk (line 323) | pub fn then_chunk<Output: Chunk>(
function then_expand (line 366) | pub fn then_expand<Output: Chunk>(
function then_store_with (line 409) | pub fn then_store_with<Output: Chunk>(
function split_by (line 493) | pub fn split_by<P>(self, predicate: P) -> (Self, Self)
function merge (line 545) | pub fn merge(self, other: Self) -> Self {
function throttle (line 559) | pub fn throttle(mut self, duration: impl Into<Duration>) -> Self {
function filter_errors (line 571) | pub fn filter_errors(mut self) -> Self {
function filter (line 591) | pub fn filter<F>(mut self, filter: F) -> Self
function log_all (line 611) | pub fn log_all(self) -> Self {
function stats (line 631) | pub fn stats(&self) -> swiftide_core::statistics::PipelineStats {
function stats_collector (line 640) | pub fn stats_collector(&self) -> &StatsCollector {
function log_errors (line 648) | pub fn log_errors(mut self) -> Self {
function log_nodes (line 661) | pub fn log_nodes(mut self) -> Self {
function run (line 683) | pub async fn run(mut self) -> Result<()> {
function test_simple_run (line 744) | async fn test_simple_run() {
function test_skipping_errors (line 811) | async fn test_skipping_errors() {
function test_concurrent_calls_with_simple_transformer (line 837) | async fn test_concurrent_calls_with_simple_transformer() {
function test_arbitrary_closures_as_transformer (line 876) | async fn test_arbitrary_closures_as_transformer() {
function test_arbitrary_closures_as_batch_transformer (line 902) | async fn test_arbitrary_closures_as_batch_transformer() {
function test_filter_closure (line 929) | async fn test_filter_closure() {
function test_split_and_merge (line 957) | async fn test_split_and_merge() {
function test_all_steps_should_work_as_dyn_box (line 1019) | async fn test_all_steps_should_work_as_dyn_box() {
function test_pipeline_statistics (line 1058) | async fn test_pipeline_statistics() {
function test_stats_collector_access (line 1095) | async fn test_stats_collector_access() {
FILE: swiftide-indexing/src/transformers/chunk_markdown.rs
constant DEFAULT_MAX_CHAR_SIZE (line 9) | const DEFAULT_MAX_CHAR_SIZE: usize = 2056;
type ChunkMarkdown (line 21) | pub struct ChunkMarkdown {
method fmt (line 52) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method builder (line 68) | pub fn builder() -> ChunkMarkdownBuilder {
method from_max_characters (line 74) | pub fn from_max_characters(max_characters: usize) -> Self {
method from_chunk_range (line 85) | pub fn from_chunk_range(range: std::ops::Range<usize>) -> Self {
method with_concurrency (line 91) | pub fn with_concurrency(mut self, concurrency: usize) -> Self {
method min_size (line 96) | fn min_size(&self) -> usize {
method default (line 62) | fn default() -> Self {
method default_client (line 102) | fn default_client(&self) -> Arc<MarkdownSplitter<Characters>> {
type Input (line 116) | type Input = String;
type Output (line 117) | type Output = String;
method transform_node (line 120) | async fn transform_node(&self, node: TextNode) -> IndexingStream<String> {
method concurrency (line 141) | fn concurrency(&self) -> Option<usize> {
constant MARKDOWN (line 151) | const MARKDOWN: &str = r"
function test_transforming_with_max_characters_and_trimming (line 166) | async fn test_transforming_with_max_characters_and_trimming() {
function test_always_within_range (line 190) | async fn test_always_within_range() {
function test_builder (line 218) | fn test_builder() {
FILE: swiftide-indexing/src/transformers/chunk_text.rs
constant DEFAULT_MAX_CHAR_SIZE (line 9) | const DEFAULT_MAX_CHAR_SIZE: usize = 2056;
type ChunkText (line 22) | pub struct ChunkText {
method builder (line 62) | pub fn builder() -> ChunkTextBuilder {
method from_max_characters (line 68) | pub fn from_max_characters(max_characters: usize) -> Self {
method from_chunk_range (line 79) | pub fn from_chunk_range(range: std::ops::Range<usize>) -> Self {
method with_concurrency (line 85) | pub fn with_concurrency(mut self, concurrency: usize) -> Self {
method min_size (line 90) | fn min_size(&self) -> usize {
method default (line 56) | fn default() -> Self {
method default_client (line 96) | fn default_client(&self) -> Arc<TextSplitter<Characters>> {
type Input (line 109) | type Input = String;
type Output (line 110) | type Output = String;
method transform_node (line 113) | async fn transform_node(&self, node: TextNode) -> IndexingStream<String> {
method concurrency (line 134) | fn concurrency(&self) -> Option<usize> {
constant TEXT (line 144) | const TEXT: &str = r"
function test_transforming_with_max_characters_and_trimming (line 153) | async fn test_transforming_with_max_characters_and_trimming() {
function test_always_within_range (line 173) | async fn test_always_within_range() {
function test_builder (line 201) | fn test_builder() {
FILE: swiftide-indexing/src/transformers/embed.rs
type Embed (line 15) | pub struct Embed {
method fmt (line 22) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method new (line 40) | pub fn new(model: impl EmbeddingModel + 'static) -> Self {
method with_concurrency (line 49) | pub fn with_concurrency(mut self, concurrency: usize) -> Self {
method with_batch_size (line 64) | pub fn with_batch_size(mut self, batch_size: usize) -> Self {
type Input (line 75) | type Input = String;
type Output (line 76) | type Output = String;
method batch_transform (line 92) | async fn batch_transform(&self, mut nodes: Vec<TextNode>) -> IndexingStr...
method concurrency (line 136) | fn concurrency(&self) -> Option<usize> {
method batch_size (line 140) | fn batch_size(&self) -> Option<usize> {
type TestData (line 159) | struct TestData<'a> {
function batch_transform (line 259) | async fn batch_transform(test_data: Vec<TestData<'_>>) {
function test_returns_error_properly_if_embed_fails (line 316) | async fn test_returns_error_properly_if_embed_fails() {
FILE: swiftide-indexing/src/transformers/metadata_keywords.rs
type MetadataKeywords (line 17) | pub struct MetadataKeywords {}
type Input (line 21) | type Input = String;
type Output (line 22) | type Output = String;
method transform_node (line 41) | async fn transform_node(&self, mut node: TextNode) -> Result<TextNode> {
method concurrency (line 50) | fn concurrency(&self) -> Option<usize> {
function test_template (line 62) | async fn test_template() {
function test_metadata_keywords (line 70) | async fn test_metadata_keywords() {
FILE: swiftide-indexing/src/transformers/metadata_qa_text.rs
type MetadataQAText (line 18) | pub struct MetadataQAText {
type Input (line 25) | type Input = String;
type Output (line 26) | type Output = String;
method transform_node (line 45) | async fn transform_node(&self, mut node: TextNode) -> Result<TextNode> {
method concurrency (line 59) | fn concurrency(&self) -> Option<usize> {
function test_template (line 71) | async fn test_template() {
function test_metadata_qacode (line 82) | async fn test_metadata_qacode() {
FILE: swiftide-indexing/src/transformers/metadata_summary.rs
type MetadataSummary (line 18) | pub struct MetadataSummary {}
type Input (line 22) | type Input = String;
type Output (line 23) | type Output = String;
method transform_node (line 41) | async fn transform_node(&self, mut node: TextNode) -> Result<TextNode> {
method concurrency (line 51) | fn concurrency(&self) -> Option<usize> {
function test_template (line 63) | async fn test_template() {
function test_metadata_summary (line 71) | async fn test_metadata_summary() {
FILE: swiftide-indexing/src/transformers/metadata_title.rs
type MetadataTitle (line 17) | pub struct MetadataTitle {}
type Input (line 21) | type Input = String;
type Output (line 22) | type Output = String;
method transform_node (line 40) | async fn transform_node(&self, mut node: TextNode) -> Result<TextNode> {
method concurrency (line 50) | fn concurrency(&self) -> Option<usize> {
function test_template (line 62) | async fn test_template() {
function test_metadata_title (line 70) | async fn test_metadata_title() {
FILE: swiftide-indexing/src/transformers/sparse_embed.rs
type SparseEmbed (line 16) | pub struct SparseEmbed {
method fmt (line 23) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method new (line 40) | pub fn new(model: impl SparseEmbeddingModel + 'static) -> Self {
method with_concurrency (line 49) | pub fn with_concurrency(mut self, concurrency: usize) -> Self {
method with_batch_size (line 64) | pub fn with_batch_size(mut self, batch_size: usize) -> Self {
type Input (line 75) | type Input = String;
type Output (line 76) | type Output = String;
method batch_transform (line 91) | async fn batch_transform(&self, mut nodes: Vec<TextNode>) -> IndexingStr...
method concurrency (line 135) | fn concurrency(&self) -> Option<usize> {
method batch_size (line 139) | fn batch_size(&self) -> Option<usize> {
type TestData (line 160) | struct TestData<'a> {
function batch_transform (line 260) | async fn batch_transform(test_data: Vec<TestData<'_>>) {
function test_returns_error_properly_if_sparse_embed_fails (line 343) | async fn test_returns_error_properly_if_sparse_embed_fails() {
FILE: swiftide-integrations/src/anthropic/chat_completion.rs
method complete (line 28) | async fn complete(
method complete_stream (line 116) | async fn complete_stream(&self, request: &ChatCompletionRequest<'_>) -> ...
function append_delta_from_chunk (line 189) | fn append_delta_from_chunk(chunk: &MessagesStreamEvent, lock: &mut ChatC...
method build_request (line 240) | fn build_request(
function messages_to_antropic (line 279) | fn messages_to_antropic(messages: &[ChatMessage]) -> Result<Vec<Message>> {
function tool_result_to_anthropic (line 312) | fn tool_result_to_anthropic(
function message_to_antropic (line 324) | fn message_to_antropic(message: &ChatMessage) -> Result<Option<Message>> {
function tools_to_anthropic (line 391) | fn tools_to_anthropic(
type FakeTool (line 426) | struct FakeTool();
type AlphaTool (line 429) | struct AlphaTool();
type LocationArgs (line 432) | struct LocationArgs {
type NestedCommentArgs (line 438) | struct NestedCommentArgs {
type NestedCommentRequest (line 444) | struct NestedCommentRequest {
method invoke (line 459) | async fn invoke(
method name (line 470) | fn name(&self) -> std::borrow::Cow<'_, str> {
method tool_spec (line 474) | fn tool_spec(&self) -> ToolSpec {
method invoke (line 486) | async fn invoke(
method name (line 497) | fn name(&self) -> std::borrow::Cow<'_, str> {
method tool_spec (line 501) | fn tool_spec(&self) -> ToolSpec {
function test_complete_without_tools (line 512) | async fn test_complete_without_tools() {
function test_complete_with_tools (line 553) | async fn test_complete_with_tools() {
function test_build_request_orders_tools_deterministically (line 632) | fn test_build_request_orders_tools_deterministically() {
function test_complete_with_system_prompt (line 658) | async fn test_complete_with_system_prompt() {
function test_tools_to_anthropic (line 714) | fn test_tools_to_anthropic() {
function test_tools_to_anthropic_preserves_optional_nested_fields (line 734) | fn test_tools_to_anthropic_preserves_optional_nested_fields() {
function test_build_request_groups_adjacent_tool_outputs (line 768) | fn test_build_request_groups_adjacent_tool_outputs() {
FILE: swiftide-integrations/src/anthropic/mod.rs
type Anthropic (line 11) | pub struct Anthropic {
method fmt (line 42) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method builder (line 66) | pub fn builder() -> AnthropicBuilder {
type Options (line 52) | pub struct Options {
method default (line 58) | fn default() -> Self {
method on_usage (line 73) | pub fn on_usage<F>(&mut self, func: F) -> &mut Self
method on_usage_async (line 88) | pub fn on_usage_async<F>(&mut self, func: F) -> &mut Self
method client (line 116) | pub fn client(&mut self, client: async_anthropic::Client) -> &mut Self {
method default_prompt_model (line 128) | pub fn default_prompt_model(&mut self, model: impl Into<String>) -> &mut...
FILE: swiftide-integrations/src/anthropic/simple_prompt.rs
method prompt (line 17) | async fn prompt(
function test_simple_prompt_with_mock (line 102) | async fn test_simple_prompt_with_mock() {
FILE: swiftide-integrations/src/anthropic/tool_schema.rs
type AnthropicToolSchema (line 4) | pub(super) struct AnthropicToolSchema(Value);
method into_value (line 7) | pub(super) fn into_value(self) -> Value {
type Error (line 13) | type Error = ToolSpecError;
method try_from (line 15) | fn try_from(spec: &ToolSpec) -> Result<Self, Self::Error> {
FILE: swiftide-integrations/src/aws_bedrock_v2/chat_completion.rs
type ConverseInputParts (line 40) | type ConverseInputParts = (
type ExtractedMessage (line 47) | type ExtractedMessage = (Option<String>, Option<Vec<ToolCall>>, Vec<Reas...
method complete (line 56) | async fn complete(
method complete_stream (line 177) | async fn complete_stream(&self, request: &ChatCompletionRequest<'_>) -> ...
function build_converse_input (line 386) | fn build_converse_input(
function user_message_from_text (line 469) | fn user_message_from_text(text: String) -> Result<Message, LanguageModel...
function user_message_from_parts (line 473) | fn user_message_from_parts(
function image_block_from_part (line 536) | fn image_block_from_part(
function document_block_from_part (line 550) | fn document_block_from_part(
function audio_block_from_part (line 567) | fn audio_block_from_part(
function video_block_from_part (line 581) | fn video_block_from_part(
function image_source_from_content_source (line 595) | fn image_source_from_content_source(
function document_source_from_content_source (line 601) | fn document_source_from_content_source(
function audio_source_from_content_source (line 612) | fn audio_source_from_content_source(
function video_source_from_content_source (line 618) | fn video_source_from_content_source(
function source_from_content_source (line 624) | fn source_from_content_source<T>(
function image_format_from_source (line 652) | fn image_format_from_source(
function document_format_from_source (line 665) | fn document_format_from_source(
function audio_format_from_source (line 678) | fn audio_format_from_source(
function video_format_from_source (line 691) | fn video_format_from_source(
function resolve_format (line 704) | fn resolve_format<T>(
function infer_image_format_from_source (line 720) | fn infer_image_format_from_source(source: &ChatMessageContentSource) -> ...
function infer_document_format_from_source (line 729) | fn infer_document_format_from_source(source: &ChatMessageContentSource) ...
function infer_audio_format_from_source (line 738) | fn infer_audio_format_from_source(source: &ChatMessageContentSource) -> ...
function infer_video_format_from_source (line 747) | fn infer_video_format_from_source(source: &ChatMessageContentSource) -> ...
function infer_format_from_source (line 756) | fn infer_format_from_source(
function s3_location (line 782) | fn s3_location(uri: &str, bucket_owner: Option<&str>) -> Result<S3Locati...
function is_s3_url (line 791) | fn is_s3_url(url: &str) -> bool {
function parse_data_url (line 795) | fn parse_data_url(url: &str) -> Option<(&str, &str)> {
function decode_data_url_bytes (line 802) | fn decode_data_url_bytes(encoded: &str) -> Result<Vec<u8>, LanguageModel...
function extension_from_url (line 808) | fn extension_from_url(url: &str) -> Option<&str> {
function mapped_format (line 815) | fn mapped_format(value: &str, mappings: &[(&'static str, &'static str)])...
function message_from_blocks (line 821) | fn message_from_blocks(
function tool_output_to_result_block (line 832) | fn tool_output_to_result_block(
function tool_output_to_content_block (line 851) | fn tool_output_to_content_block(
function tool_call_args_to_document (line 867) | fn tool_call_args_to_document(args: Option<&str>) -> Result<Document, La...
function tool_config_from_specs (line 876) | fn tool_config_from_specs<'a>(
function tool_spec_to_bedrock (line 898) | fn tool_spec_to_bedrock(spec: &ToolSpec, strict: bool) -> Result<Tool, L...
function response_to_chat_completion (line 917) | pub(super) fn response_to_chat_completion(
function extract_message_and_tool_calls (line 943) | fn extract_message_and_tool_calls(
function document_to_json_string (line 986) | fn document_to_json_string(document: &Document) -> String {
function apply_stream_event (line 992) | fn apply_stream_event(
function assistant_reasoning_message_from_item (line 1044) | fn assistant_reasoning_message_from_item(
function reasoning_item_from_reasoning_text (line 1077) | fn reasoning_item_from_reasoning_text(
function apply_reasoning_delta (line 1091) | fn apply_reasoning_delta(
function ensure_reasoning_item (line 1115) | fn ensure_reasoning_item(
function json_value_to_document (line 1140) | fn json_value_to_document(value: &serde_json::Value) -> Result<Document,...
function parse_document_json_bytes (line 1145) | fn parse_document_json_bytes(input: &[u8]) -> anyhow::Result<Document> {
constant IMAGE_MEDIA_TYPE_FORMATS (line 1156) | const IMAGE_MEDIA_TYPE_FORMATS: &[(&str, &str)] = &[
constant IMAGE_EXTENSION_FORMATS (line 1164) | const IMAGE_EXTENSION_FORMATS: &[(&str, &str)] = &[
constant DOCUMENT_MEDIA_TYPE_FORMATS (line 1172) | const DOCUMENT_MEDIA_TYPE_FORMATS: &[(&str, &str)] = &[
constant DOCUMENT_EXTENSION_FORMATS (line 1191) | const DOCUMENT_EXTENSION_FORMATS: &[(&str, &str)] = &[
constant AUDIO_MEDIA_TYPE_FORMATS (line 1205) | const AUDIO_MEDIA_TYPE_FORMATS: &[(&str, &str)] = &[
constant AUDIO_EXTENSION_FORMATS (line 1223) | const AUDIO_EXTENSION_FORMATS: &[(&str, &str)] = &[
constant VIDEO_MEDIA_TYPE_FORMATS (line 1241) | const VIDEO_MEDIA_TYPE_FORMATS: &[(&str, &str)] = &[
constant VIDEO_EXTENSION_FORMATS (line 1252) | const VIDEO_EXTENSION_FORMATS: &[(&str, &str)] = &[
type WeatherArgs (line 1296) | struct WeatherArgs {
type NestedCommentArgs (line 1302) | struct NestedCommentArgs {
type NestedCommentRequest (line 1308) | struct NestedCommentRequest {
function response_with_text_and_tool_call (line 1321) | fn response_with_text_and_tool_call() -> ConverseOutput {
function test_complete_maps_text_and_tool_calls (line 1358) | async fn test_complete_maps_text_and_tool_calls() {
function test_complete_tracks_langfuse_failure_metadata_on_converse_error (line 1413) | fn test_complete_tracks_langfuse_failure_metadata_on_converse_error() {
function test_complete_passes_additional_model_fields (line 1464) | async fn test_complete_passes_additional_model_fields() {
function test_complete_passes_reasoning_effort_for_claude_opus_4_5 (line 1525) | async fn test_complete_passes_reasoning_effort_for_claude_opus_4_5() {
function test_complete_respects_tool_strict_option (line 1603) | async fn test_complete_respects_tool_strict_option() {
function test_complete_stream_requires_model (line 1656) | async fn test_complete_stream_requires_model() {
function test_complete_stream_tracks_langfuse_failure_metadata_on_stream_error (line 1678) | fn test_complete_stream_tracks_langfuse_failure_metadata_on_stream_error...
function test_complete_stream_rejects_system_only_messages (line 1725) | async fn test_complete_stream_rejects_system_only_messages() {
function test_complete_stream_returns_upstream_stream_error (line 1747) | async fn test_complete_stream_returns_upstream_stream_error() {
function test_complete_green_path_with_wiremock (line 1794) | async fn test_complete_green_path_with_wiremock() {
function test_complete_stream_green_path_with_wiremock (line 1852) | async fn test_complete_stream_green_path_with_wiremock() {
function test_tool_config_from_specs_builds_schema (line 1933) | fn test_tool_config_from_specs_builds_schema() {
function test_tool_config_from_specs_can_disable_strict (line 1968) | fn test_tool_config_from_specs_can_disable_strict() {
function test_tool_config_from_specs_does_not_apply_openai_required_workaround (line 1999) | fn test_tool_config_from_specs_does_not_apply_openai_required_workaround...
function test_tool_config_from_specs_orders_tools_deterministically (line 2064) | fn test_tool_config_from_specs_orders_tools_deterministically() {
function test_response_to_chat_completion_maps_reasoning_content (line 2099) | fn test_response_to_chat_completion_maps_reasoning_content() {
function test_build_converse_input_replays_reasoning_items (line 2134) | fn test_build_converse_input_replays_reasoning_items() {
function test_build_converse_input_groups_adjacent_tool_outputs (line 2165) | fn test_build_converse_input_groups_adjacent_tool_outputs() {
function test_build_converse_input_maps_image_part (line 2218) | fn test_build_converse_input_maps_image_part() {
function test_build_converse_input_maps_audio_part (line 2246) | fn test_build_converse_input_maps_audio_part() {
function test_build_converse_input_maps_video_part (line 2274) | fn test_build_converse_input_maps_video_part() {
function test_build_converse_input_rejects_audio_http_url (line 2299) | fn test_build_converse_input_rejects_audio_http_url() {
function test_build_converse_input_rejects_document_without_text (line 2313) | fn test_build_converse_input_rejects_document_without_text() {
function test_apply_stream_event_accumulates_deltas (line 2330) | fn test_apply_stream_event_accumulates_deltas() {
FILE: swiftide-integrations/src/aws_bedrock_v2/mod.rs
type AwsBedrock (line 41) | pub struct AwsBedrock {
method fmt (line 71) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method builder (line 210) | pub fn builder() -> AwsBedrockBuilder {
method options (line 215) | pub fn options(&self) -> &Options {
method options_mut (line 220) | pub fn options_mut(&mut self) -> &mut Options {
method prompt_model (line 224) | fn prompt_model(&self) -> Result<&str, LanguageModelError> {
method report_usage (line 231) | async fn report_usage(&self, model: &str, usage: &Usage) -> Result<(),...
method track_completion (line 254) | async fn track_completion<R, S>(
method track_failure (line 281) | fn track_failure<R, S>(
type ReasoningEffort (line 86) | pub enum ReasoningEffort {
method as_str (line 94) | fn as_str(self) -> &'static str {
type Options (line 106) | pub struct Options {
method builder (line 164) | pub fn builder() -> OptionsBuilder {
method tool_strict_enabled (line 168) | pub fn tool_strict_enabled(&self) -> bool {
method merge (line 172) | pub fn merge(&mut self, other: Options) {
method default_config (line 302) | fn default_config(&self) -> aws_config::SdkConfig {
method default_client (line 306) | fn default_client(&self) -> Arc<Client> {
method client (line 311) | pub fn client(&mut self, client: Client) -> &mut Self {
method default_prompt_model (line 317) | pub fn default_prompt_model(&mut self, model: impl Into<String>) -> &mut...
method default_options (line 333) | pub fn default_options(&mut self, options: impl Into<Options>) -> &mut S...
method on_usage (line 345) | pub fn on_usage<F>(&mut self, func: F) -> &mut Self
method on_usage_async (line 360) | pub fn on_usage_async<F>(&mut self, func: F) -> &mut Self
method test_client (line 381) | pub fn test_client(&mut self, client: impl BedrockConverse + 'static) ->...
type BedrockConverse (line 390) | trait BedrockConverse: std::fmt::Debug + Send + Sync {
method converse (line 391) | async fn converse(
method converse_stream (line 403) | async fn converse_stream(
method converse (line 418) | async fn converse(
method converse_stream (line 449) | async fn converse_stream(
function converse_error_to_language_model_error (line 479) | fn converse_error_to_language_model_error<R>(
function converse_stream_error_to_language_model_error (line 497) | fn converse_stream_error_to_language_model_error<R>(
function converse_stream_output_error_to_language_model_error (line 516) | fn converse_stream_output_error_to_language_model_error<R>(
function sdk_error_to_language_model_error (line 533) | fn sdk_error_to_language_model_error<E, R>(
function error_chain_message (line 560) | fn error_chain_message(error: &(dyn std::error::Error + 'static)) -> Str...
function inference_config_from_options (line 567) | fn inference_config_from_options(options: &Options) -> Option<InferenceC...
function additional_model_request_fields_from_options (line 594) | fn additional_model_request_fields_from_options(
function document_string (line 663) | fn document_string(value: Document) -> Result<String, LanguageModelError> {
function push_unique_string (line 672) | fn push_unique_string(values: &mut Vec<String>, value: String) {
function usage_from_bedrock (line 678) | fn usage_from_bedrock(usage: &TokenUsage) -> Usage {
function context_length_exceeded_if_empty (line 699) | fn context_length_exceeded_if_empty(
function i32_to_u32 (line 718) | fn i32_to_u32(value: i32) -> Option<u32> {
function langfuse_json (line 723) | fn langfuse_json<T: Serialize + ?Sized>(value: &T) -> Option<String> {
function langfuse_json_redacted (line 728) | fn langfuse_json_redacted<T: Serialize + ?Sized>(value: &T) -> Option<St...
function redact_sensitive_payloads (line 735) | fn redact_sensitive_payloads(value: &mut serde_json::Value) {
function truncate_data_url (line 761) | fn truncate_data_url(url: &str) -> Option<String> {
function usage (line 804) | fn usage(total_tokens: u32) -> Usage {
function test_options_builder_and_merge_only_overrides_present_fields (line 814) | fn test_options_builder_and_merge_only_overrides_present_fields() {
function test_tool_strict_enabled_defaults_to_true (line 865) | fn test_tool_strict_enabled_defaults_to_true() {
function test_builder_default_options_and_prompt_model_merge_branches (line 877) | fn test_builder_default_options_and_prompt_model_merge_branches() {
function test_track_completion_invokes_sync_usage_callback (line 907) | async fn test_track_completion_invokes_sync_usage_callback() {
function test_track_completion_invokes_async_usage_callback (line 934) | async fn test_track_completion_invokes_async_usage_callback() {
function test_inference_config_from_options_builds_only_when_values_are_set (line 967) | fn test_inference_config_from_options_builds_only_when_values_are_set() {
function test_additional_model_request_fields_merges_reasoning_effort_and_betas (line 986) | fn test_additional_model_request_fields_merges_reasoning_effort_and_beta...
function test_additional_model_request_fields_requires_object_when_merging_typed_fields (line 1056) | fn test_additional_model_request_fields_requires_object_when_merging_typ...
function test_usage_from_bedrock_prefers_cache_read_and_falls_back_to_cache_write (line 1072) | fn test_usage_from_bedrock_prefers_cache_read_and_falls_back_to_cache_wr...
function test_usage_from_bedrock_defaults_negative_counts_to_zero (line 1110) | fn test_usage_from_bedrock_defaults_negative_counts_to_zero() {
function test_context_length_exceeded_only_when_empty_and_context_limit_hit (line 1127) | fn test_context_length_exceeded_only_when_empty_and_context_limit_hit() {
function test_sdk_error_mapping_classifies_transient_transport_failures (line 1147) | fn test_sdk_error_mapping_classifies_transient_transport_failures() {
function test_converse_error_mapping_distinguishes_transient_and_permanent_service_errors (line 1177) | fn test_converse_error_mapping_distinguishes_transient_and_permanent_ser...
function test_converse_stream_error_mapping_distinguishes_transient_and_permanent_service_errors (line 1192) | fn test_converse_stream_error_mapping_distinguishes_transient_and_perman...
function test_converse_stream_output_error_mapping_distinguishes_transient_and_permanent_service_errors (line 1211) | fn test_converse_stream_output_error_mapping_distinguishes_transient_and...
function test_error_chain_message_collects_nested_sources (line 1233) | fn test_error_chain_message_collects_nested_sources() {
function test_converse_error_mapping_model_not_ready_and_stream_internal_server_are_transient (line 1242) | fn test_converse_error_mapping_model_not_ready_and_stream_internal_serve...
FILE: swiftide-integrations/src/aws_bedrock_v2/simple_prompt.rs
method prompt (line 21) | async fn prompt(&self, prompt: Prompt) -> Result<String, LanguageModelEr...
function response_with_text (line 64) | fn response_with_text(text: &str) -> ConverseOutput {
function test_prompt_requires_model (line 79) | async fn test_prompt_requires_model() {
function test_prompt_uses_converse_api_and_extracts_text (line 93) | async fn test_prompt_uses_converse_api_and_extracts_text() {
function test_prompt_maps_context_window_stop_reason (line 146) | async fn test_prompt_maps_context_window_stop_reason() {
function test_prompt_invokes_usage_callback (line 174) | async fn test_prompt_invokes_usage_callback() {
function test_prompt_green_path_with_wiremock (line 235) | async fn test_prompt_green_path_with_wiremock() {
function test_prompt_returns_error_when_completion_has_no_text (line 285) | async fn test_prompt_returns_error_when_completion_has_no_text() {
function smoke_live_bedrock_reasoning_effort_prompt (line 325) | async fn smoke_live_bedrock_reasoning_effort_prompt() {
FILE: swiftide-integrations/src/aws_bedrock_v2/structured_prompt.rs
method structured_prompt_dyn (line 22) | async fn structured_prompt_dyn(
type StructuredOutput (line 176) | struct StructuredOutput {
function test_structured_prompt_parses_json_response (line 181) | async fn test_structured_prompt_parses_json_response() {
function test_structured_prompt_passes_reasoning_effort_in_additional_model_request_fields (line 252) | async fn test_structured_prompt_passes_reasoning_effort_in_additional_mo...
function test_structured_prompt_tracks_langfuse_failure_metadata_on_converse_error (line 340) | fn test_structured_prompt_tracks_langfuse_failure_metadata_on_converse_e...
function test_structured_prompt_reports_usage (line 392) | async fn test_structured_prompt_reports_usage() {
function test_structured_prompt_green_path_with_wiremock (line 445) | async fn test_structured_prompt_green_path_with_wiremock() {
function test_structured_prompt_returns_error_when_response_has_no_text (line 518) | async fn test_structured_prompt_returns_error_when_response_has_no_text() {
function test_structured_prompt_returns_error_on_invalid_json_payload (line 560) | async fn test_structured_prompt_returns_error_on_invalid_json_payload() {
FILE: swiftide-integrations/src/aws_bedrock_v2/test_utils.rs
constant TEST_MODEL_ID (line 6) | pub(crate) const TEST_MODEL_ID: &str = "bedrock-test-model";
function bedrock_client_for_mock_server (line 8) | pub(crate) fn bedrock_client_for_mock_server(endpoint_url: &str) -> Clie...
function converse_stream_event (line 19) | pub(crate) fn converse_stream_event(event_type: &str, payload: &Value) -...
type RecordedTracingEvent (line 42) | pub(crate) type RecordedTracingEvent = std::collections::HashMap<String,...
type EventCaptureLayer (line 46) | struct EventCaptureLayer {
method on_event (line 89) | fn on_event(
type EventFieldVisitor (line 52) | struct EventFieldVisitor {
method record_str (line 58) | fn record_str(&mut self, field: &tracing::field::Field, value: &str) {
method record_bool (line 63) | fn record_bool(&mut self, field: &tracing::field::Field, value: bool) {
method record_i64 (line 68) | fn record_i64(&mut self, field: &tracing::field::Field, value: i64) {
method record_u64 (line 73) | fn record_u64(&mut self, field: &tracing::field::Field, value: u64) {
method record_debug (line 78) | fn record_debug(&mut self, field: &tracing::field::Field, value: &dyn ...
function run_with_langfuse_event_capture (line 101) | pub(crate) fn run_with_langfuse_event_capture<F, Fut, T>(
FILE: swiftide-integrations/src/aws_bedrock_v2/tool_schema.rs
type AwsBedrockToolSchema (line 4) | pub(super) struct AwsBedrockToolSchema(Value);
method into_value (line 7) | pub(super) fn into_value(self) -> Value {
type Error (line 13) | type Error = ToolSpecError;
method try_from (line 15) | fn try_from(spec: &ToolSpec) -> Result<Self, Self::Error> {
FILE: swiftide-integrations/src/dashscope/config.rs
constant DASHSCOPE_API_BASE (line 5) | const DASHSCOPE_API_BASE: &str = "https://dashscope.aliyuncs.com/compati...
type DashscopeConfig (line 9) | pub struct DashscopeConfig {
method headers (line 29) | fn headers(&self) -> HeaderMap {
method url (line 43) | fn url(&self, path: &str) -> String {
method api_base (line 47) | fn api_base(&self) -> &str {
method api_key (line 51) | fn api_key(&self) -> &SecretString {
method query (line 55) | fn query(&self) -> Vec<(&str, &str)> {
method default (line 15) | fn default() -> Self {
function get_api_key (line 23) | fn get_api_key() -> String {
FILE: swiftide-integrations/src/dashscope/mod.rs
type Dashscope (line 7) | pub type Dashscope = openai::GenericOpenAI<DashscopeConfig>;
method builder (line 9) | pub fn builder() -> DashscopeBuilder {
type DashscopeBuilder (line 14) | pub type DashscopeBuilder = openai::GenericOpenAIBuilder<DashscopeConfig>;
type DashscopeBuilderError (line 15) | pub type DashscopeBuilderError = openai::GenericOpenAIBuilderError;
method default (line 19) | fn default() -> Self {
function test_default_prompt_model (line 28) | fn test_default_prompt_model() {
FILE: swiftide-integrations/src/duckdb/mod.rs
constant DEFAULT_INDEXING_SCHEMA (line 19) | const DEFAULT_INDEXING_SCHEMA: &str = include_str!("schema.sql");
constant DEFAULT_UPSERT_QUERY (line 20) | const DEFAULT_UPSERT_QUERY: &str = include_str!("upsert.sql");
constant DEFAULT_HYBRID_QUERY (line 21) | const DEFAULT_HYBRID_QUERY: &str = include_str!("hybrid_query.sql");
type Duckdb (line 36) | pub struct Duckdb<T: Chunk = String> {
function fmt (line 92) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
function builder (line 102) | pub fn builder() -> DuckdbBuilder<String> {
function table_name (line 112) | pub fn table_name(&self) -> &str {
function cache_table (line 117) | pub fn cache_table(&self) -> &str {
function connection (line 122) | pub fn connection(&self) -> &Mutex<duckdb::Connection> {
function create_vector_indices (line 139) | pub fn create_vector_indices(&self) -> Result<()> {
function lazy_create_cache (line 167) | pub async fn lazy_create_cache(&self) -> anyhow::Result<()> {
function node_key (line 194) | pub fn node_key(&self, node: &swiftide_core::indexing::Node<T>) -> String {
function hybrid_query_sql (line 198) | fn hybrid_query_sql(
function wrap_and_escape (line 243) | fn wrap_and_escape(s: &str) -> String {
function connection (line 260) | pub fn connection(&mut self, connection: impl Into<duckdb::Connection>) ...
function with_vector (line 265) | pub fn with_vector(&mut self, field: EmbeddedField, size: usize) -> &mut...
function default_schema (line 272) | fn default_schema(&self) -> String {
function default_node_upsert_sql (line 281) | fn default_node_upsert_sql(&self) -> String {
FILE: swiftide-integrations/src/duckdb/node_cache.rs
type Input (line 29) | type Input = T;
method get (line 31) | async fn get(&self, node: &Node<T>) -> bool {
method set (line 59) | async fn set(&self, node: &Node<T>) {
method clear (line 97) | async fn clear(&self) -> anyhow::Result<()> {
function setup_duckdb (line 115) | fn setup_duckdb() -> Duckdb {
function test_get_set (line 123) | async fn test_get_set() {
function test_clear (line 133) | async fn test_clear() {
FILE: swiftide-integrations/src/duckdb/persist.rs
type TextNodeValues (line 24) | enum TextNodeValues<'a> {
method to_sql (line 34) | fn to_sql(&self) -> duckdb::Result<ToSqlOutput<'_>> {
function install_extensions (line 62) | fn install_extensions(&self, conn: &duckdb::Connection) -> Result<()> {
function store_node_on_stmt (line 71) | fn store_node_on_stmt(&self, stmt: &mut Statement<'_>, node: &Node<T>) -...
type Input (line 100) | type Input = T;
type Output (line 101) | type Output = T;
method setup (line 103) | async fn setup(&self) -> Result<()> {
method store (line 150) | async fn store(&self, node: indexing::Node<T>) -> Result<indexing::Node<...
method batch_store (line 158) | async fn batch_store(&self, nodes: Vec<indexing::Node<T>>) -> indexing::...
function test_persisting_nodes (line 204) | async fn test_persisting_nodes() {
function test_with_metadata (line 308) | async fn test_with_metadata() {
function test_running_setup_twice (line 363) | async fn test_running_setup_twice() {
function test_persisted (line 376) | async fn test_persisted() {
FILE: swiftide-integrations/src/duckdb/retrieve.rs
function retrieve (line 17) | async fn retrieve(
function retrieve (line 80) | async fn retrieve(
function retrieve (line 119) | async fn retrieve(
function test_duckdb_retrieving_documents (line 168) | async fn test_duckdb_retrieving_documents() {
function test_duckdb_retrieving_documents_hybrid (line 207) | async fn test_duckdb_retrieving_documents_hybrid() {
FILE: swiftide-integrations/src/duckdb/schema.sql
type table_name (line 5) | CREATE TABLE IF NOT EXISTS {{table_name}} (
FILE: swiftide-integrations/src/fastembed/embedding_model.rs
method embed (line 9) | async fn embed(&self, input: Vec<String>) -> Result<Embeddings, Language...
FILE: swiftide-integrations/src/fastembed/mod.rs
type EmbeddingModelType (line 18) | pub enum EmbeddingModelType {
method from (line 24) | fn from(val: TextEmbedding) -> Self {
method from (line 30) | fn from(val: SparseTextEmbedding) -> Self {
constant DEFAULT_BATCH_SIZE (line 38) | const DEFAULT_BATCH_SIZE: usize = 256;
type FastEmbed (line 66) | pub struct FastEmbed {
method fmt (line 77) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method try_default (line 90) | pub fn try_default() -> Result<Self> {
method try_default_sparse (line 99) | pub fn try_default_sparse() -> Result<Self> {
method builder (line 107) | pub fn builder() -> FastEmbedBuilder {
method embedding_model (line 114) | pub fn embedding_model(mut self, fastembed: impl Into<EmbeddingModelType...
function test_fastembed (line 126) | async fn test_fastembed() {
function test_sparse_fastembed (line 133) | async fn test_sparse_fastembed() {
FILE: swiftide-integrations/src/fastembed/rerank.rs
constant TOP_K (line 13) | const TOP_K: usize = 10;
type Rerank (line 29) | pub struct Rerank {
method fmt (line 56) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method builder (line 62) | pub fn builder() -> RerankBuilder {
method default (line 68) | fn default() -> Self {
method transform_response (line 83) | async fn transform_response(
function test_rerank_transform_response (line 138) | async fn test_rerank_transform_response() {
FILE: swiftide-integrations/src/fastembed/sparse_embedding_model.rs
method sparse_embed (line 9) | async fn sparse_embed(
FILE: swiftide-integrations/src/fluvio/loader.rs
type Output (line 14) | type Output = String;
method into_stream (line 17) | fn into_stream(self) -> IndexingStream<String> {
method into_stream_boxed (line 47) | fn into_stream_boxed(self: Box<Self>) -> IndexingStream<String> {
type FluvioCluster (line 70) | struct FluvioCluster {
method start (line 83) | pub async fn start() -> Result<FluvioCluster> {
method connect_spu_to_sc (line 138) | async fn connect_spu_to_sc(&self) {
method forward_logs_to_tracing (line 159) | pub fn forward_logs_to_tracing(&self) {
method client (line 167) | pub fn client(&self) -> &fluvio::Fluvio {
method create_topic (line 171) | pub async fn create_topic(&self, topic_name: impl Into<String>) -> Res...
method log_stdout (line 178) | fn log_stdout(reader: Pin<Box<dyn AsyncBufRead + Send>>) {
method log_stderr (line 189) | fn log_stderr(reader: Pin<Box<dyn AsyncBufRead + Send>>) {
method ansii_regex (line 200) | fn ansii_regex() -> Regex {
method endpoint (line 204) | pub fn endpoint(&self) -> String {
function test_fluvio_loader (line 210) | async fn test_fluvio_loader() {
FILE: swiftide-integrations/src/fluvio/mod.rs
type Fluvio (line 32) | pub struct Fluvio {
method from_consumer_config (line 43) | pub fn from_consumer_config(config: impl Into<ConsumerConfigExt>) -> F...
method builder (line 50) | pub fn builder() -> FluvioBuilder {
method fluvio_config (line 56) | pub fn fluvio_config(&mut self, config: &FluvioConfig) -> &mut Self {
FILE: swiftide-integrations/src/gemini/config.rs
constant GEMINI_API_BASE (line 5) | const GEMINI_API_BASE: &str = "https://generativelanguage.googleapis.com...
type GeminiConfig (line 9) | pub struct GeminiConfig {
method headers (line 26) | fn headers(&self) -> HeaderMap {
method url (line 40) | fn url(&self, path: &str) -> String {
method api_base (line 44) | fn api_base(&self) -> &str {
method api_key (line 48) | fn api_key(&self) -> &SecretString {
method query (line 52) | fn query(&self) -> Vec<(&str, &str)> {
method default (line 15) | fn default() -> Self {
FILE: swiftide-integrations/src/gemini/mod.rs
type Gemini (line 23) | pub type Gemini = openai::GenericOpenAI<GeminiConfig>;
method builder (line 29) | pub fn builder() -> GeminiBuilder {
type GeminiBuilder (line 24) | pub type GeminiBuilder = openai::GenericOpenAIBuilder<GeminiConfig>;
type GeminiBuilderError (line 25) | pub type GeminiBuilderError = openai::GenericOpenAIBuilderError;
method default (line 35) | fn default() -> Self {
FILE: swiftide-integrations/src/groq/config.rs
constant GROQ_API_BASE (line 5) | const GROQ_API_BASE: &str = "https://api.groq.com/openai/v1";
type GroqConfig (line 9) | pub struct GroqConfig {
method headers (line 26) | fn headers(&self) -> HeaderMap {
method url (line 40) | fn url(&self, path: &str) -> String {
method api_base (line 44) | fn api_base(&self) -> &str {
method api_key (line 48) | fn api_key(&self) -> &SecretString {
method query (line 52) | fn query(&self) -> Vec<(&str, &str)> {
method default (line 15) | fn default() -> Self {
FILE: swiftide-integrations/src/groq/mod.rs
type Groq (line 21) | pub type Groq = openai::GenericOpenAI<GroqConfig>;
method builder (line 27) | pub fn builder() -> GroqBuilder {
type GroqBuilder (line 22) | pub type GroqBuilder = openai::GenericOpenAIBuilder<GroqConfig>;
type GroqBuilderError (line 23) | pub type GroqBuilderError = openai::GenericOpenAIBuilderError;
method default (line 33) | fn default() -> Self {
FILE: swiftide-integrations/src/kafka/loader.rs
type Output (line 12) | type Output = String;
method into_stream (line 15) | fn into_stream(self) -> IndexingStream<String> {
method into_stream_boxed (line 49) | fn into_stream_boxed(self: Box<Self>) -> IndexingStream<String> {
function msg_metadata (line 54) | fn msg_metadata(node: &mut Node<String>, message: &BorrowedMessage) {
type KafkaBroker (line 94) | struct KafkaBroker {
method start (line 102) | pub async fn start() -> Result<Self> {
method create_topic (line 127) | pub async fn create_topic(&self, topic: impl AsRef<str>) -> Result<()> {
method admin_client (line 144) | fn admin_client(&self) -> AdminClient<DefaultClientContext> {
method producer (line 148) | fn producer(&self) -> FutureProducer {
function test_kafka_loader (line 154) | async fn test_kafka_loader() {
FILE: swiftide-integrations/src/kafka/mod.rs
type Kafka (line 35) | pub struct Kafka {
method from_client_config (line 55) | pub fn from_client_config(config: impl Into<ClientConfig>, topic: impl...
method builder (line 68) | pub fn builder() -> KafkaBuilder {
method producer (line 72) | fn producer(&self) -> Result<FutureProducer<DefaultClientContext>> {
method topic_exists (line 78) | fn topic_exists(&self) -> Result<bool> {
method create_topic (line 87) | async fn create_topic(&self) -> Result<()> {
method persist_key_for_node (line 106) | fn persist_key_for_node(&self, node: &TextNode) -> Result<String> {
method persist_value_for_node (line 119) | fn persist_value_for_node(&self, node: &TextNode) -> Result<String> {
method node_to_key_payload (line 127) | fn node_to_key_payload(&self, node: &TextNode) -> Result<(String, Stri...
FILE: swiftide-integrations/src/kafka/persist.rs
type Input (line 16) | type Input = String;
type Output (line 17) | type Output = String;
method setup (line 19) | async fn setup(&self) -> Result<()> {
method batch_size (line 30) | fn batch_size(&self) -> Option<usize> {
method store (line 34) | async fn store(&self, node: TextNode) -> Result<TextNode> {
method batch_store (line 46) | async fn batch_store(&self, nodes: Vec<TextNode>) -> IndexingStream<Stri...
function test_kafka_persist (line 81) | async fn test_kafka_persist() {
function test_kafka_batch_persist (line 111) | async fn test_kafka_batch_persist() {
FILE: swiftide-integrations/src/lancedb/connection_pool.rs
type LanceDBPoolManager (line 9) | pub struct LanceDBPoolManager {
method builder (line 22) | pub fn builder() -> LanceDBPoolManagerBuilder {
type LanceDBConnectionPool (line 19) | pub type LanceDBConnectionPool = deadpool::managed::Pool<LanceDBPoolMana...
type Type (line 28) | type Type = lancedb::Connection;
type Error (line 29) | type Error = anyhow::Error;
method create (line 31) | async fn create(&self) -> Result<Self::Type, Self::Error> {
method recycle (line 52) | async fn recycle(
FILE: swiftide-integrations/src/lancedb/mod.rs
type LanceDB (line 45) | pub struct LanceDB {
method fmt (line 91) | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
method builder (line 99) | pub fn builder() -> LanceDBBuilder {
method get_connection (line 108) | pub async fn get_connection(&self) -> Result<Object<LanceDBPoolManager...
method open_table (line 119) | pub async fn open_table(&self) -> Result<lancedb::Table> {
method with_vector (line 130) | pub fn with_vector(&mut self, config: impl Into<VectorConfig>) -> &mut S...
method with_metadata (line 144) | pub fn with_metadata(&mut self, config: impl Into<MetadataConfig>) -> &m...
method default_fields (line 156) | fn default_fields(&self) -> Vec<FieldConfig> {
method default_schema_from_fields (line 160) | fn default_schema_from_fields(&self) -> Arc<Schema> {
method default_connection_pool (line 201) | fn default_connection_pool(&self) -> Result<Arc<LanceDBConnectionPool>> {
type FieldConfig (line 218) | pub enum FieldConfig {
method field_name (line 226) | pub fn field_name(&self) -> String {
type VectorConfig (line 237) | pub struct VectorConfig {
method field_name (line 243) | pub fn field_name(&self) -> String {
method from (line 252) | fn from(val: EmbeddedField) -> Self {
type MetadataConfig (line 261) | pub struct MetadataConfig {
method from (line 267) | fn from(val: T) -> Self {
function normalize_field_name (line 275) | pub(crate) fn normalize_field_name(field: &str) -> String {
FILE: swiftide-integrations/src/lancedb/persist.rs
type Input (line 23) | type Input = String;
type Output (line 24) | type Output = String;
method setup (line 27) | async fn setup(&self) -> Result<()> {
method store (line 47) | async fn store(&self, node: TextNode) -> Result<TextNode> {
method batch_store (line 57) | async fn batch_store(&self, nodes: Vec<TextNode>) -> IndexingStream<Stri...
method batch_size (line 61) | fn batch_size(&self) -> Option<usize> {
method store_nodes (line 67) | async fn store_nodes(&self, nodes: &[TextNode]) -> Result<()> {
method extract_arrow_batches_from_nodes (line 95) | fn extract_arrow_batches_from_nodes(
function setup (line 175) | async fn setup() -> (TempDir, LanceDB) {
function test_no_error_when_table_exists (line 191) | async fn test_no_error_when_table_exists() {
FILE: swiftide-integrations/src/lancedb/retrieve.rs
method retrieve (line 28) | async fn retrieve(
method retrieve (line 80) | async fn retrieve(
method retrieve (line 100) | async fn retrieve(
method retrieve_from_record_batches (line 127) | fn retrieve_from_record_batches(batches: &[RecordBatch]) -> Vec<Document> {
function setup (line 188) | async fn setup() -> (TempDir, LanceDB) {
function test_retrieve_multiple_docs_and_filter (line 204) | async fn test_retrieve_multiple_docs_and_filter() {
FILE: swiftide-integrations/src/ollama/config.rs
constant OLLAMA_API_BASE (line 6) | const OLLAMA_API_BASE: &str = "http://localhost:11434/v1";
type OllamaConfig (line 10) | pub struct OllamaConfig {
method builder (line 16) | pub fn builder() -> OllamaConfigBuilder {
method with_api_base (line 20) | pub fn with_api_base(&mut self, api_base: &str) -> &mut Self {
method headers (line 37) | fn headers(&self) -> HeaderMap {
method url (line 41) | fn url(&self, path: &str) -> String {
method api_base (line 45) | fn api_base(&self) -> &str {
method api_key (line 49) | fn api_key(&self) -> &SecretString {
method query (line 53) | fn query(&self) -> Vec<(&str, &str)> {
method default (line 28) | fn default() -> Self {
FILE: swiftide-integrations/src/ollama/mod.rs
type Ollama (line 22) | pub type Ollama = openai::GenericOpenAI<OllamaConfig>;
method builder (line 29) | pub fn builder() -> OllamaBuilder {
type OllamaBuilder (line 23) | pub type OllamaBuilder = openai::GenericOpenAIBuilder<OllamaConfig>;
type OllamaBuilderError (line 24) | pub type OllamaBuilderError = openai::GenericOpenAIBuilderError;
method default (line 34) | fn default() -> Self {
function test_default_prompt_model (line 44) | fn test_default_prompt_model() {
function test_default_embed_model (line 56) | fn test_default_embed_model() {
function test_default_models (line 68) | fn test_default_models() {
function test_building_via_default_prompt_model (line 85) | fn test_building_via_default_prompt_model() {
function test_building_via_default_embed_model (line 98) | fn test_building_via_default_embed_model() {
function test_building_via_default_models (line 111) | fn test_building_via_default_models() {
FILE: swiftide-integrations/src/open_router/config.rs
constant OPENROUTER_API_BASE (line 6) | const OPENROUTER_API_BASE: &str = "https://openrouter.ai/api/v1";
type OpenRouterConfig (line 11) | pub struct OpenRouterConfig {
method builder (line 22) | pub fn builder() -> OpenRouterConfigBuilder {
method with_api_base (line 25) | pub fn with_api_base(&mut self, api_base: &str) -> &mut Self {
method with_api_key (line 31) | pub fn with_api_key(&mut self, api_key: impl Into<SecretString>) -> &m...
method with_site_url (line 36) | pub fn with_site_url(&mut self, site_url: &str) -> &mut Self {
method with_site_name (line 42) | pub fn with_site_name(&mut self, site_name: &str) -> &mut Self {
method headers (line 63) | fn headers(&self) -> HeaderMap {
method url (line 92) | fn url(&self, path: &str) -> String {
method api_base (line 96) | fn api_base(&self) -> &str {
method api_key (line 100) | fn api_key(&self) -> &SecretString {
method query (line 104) | fn query(&self) -> Vec<(&str, &str)> {
method default (line 50) | fn default() -> Self {
FILE: swiftide-integrations/src/open_router/mod.rs
type OpenRouter (line 22) | pub type OpenRouter = openai::GenericOpenAI<OpenRouterConfig>;
method builder (line 29) | pub fn builder() -> OpenRouterBuilder {
type OpenRouterBuilder (line 23) | pub type OpenRouterBuilder = openai::GenericOpenAIBuilder<OpenRouterConf...
type OpenRouterBuilderError (line 24) | pub type OpenRouterBuilderError = openai::GenericOpenAIBuilderError;
method default (line 35) | fn default() -> Self {
function test_default_prompt_model (line 45) | fn test_default_prompt_model() {
function test_default_models (line 57) | fn test_default_models() {
function test_building_via_default_prompt_model (line 69) | fn test_building_via_default_prompt_model() {
FILE: swiftide-integrations/src/openai/chat_completion.rs
method complete (line 52) | async fn complete(
method complete_stream (line 161) | async fn complete_stream(&self, request: &ChatCompletionRequest<'_>) -> ...
function complete_via_responses_api (line 351) | async fn complete_via_responses_api(
function complete_stream_via_responses_api (line 384) | async fn complete_stream_via_responses_api(
function track_completion (line 442) | pub(crate) fn track_completion<R, S>(
function langfuse_json (line 484) | pub(crate) fn langfuse_json<T: Serialize + ?Sized>(value: &T) -> Option<...
function langfuse_json_redacted (line 489) | pub(crate) fn langfuse_json_redacted<T: Serialize + ?Sized>(value: &T) -...
function redact_image_urls (line 496) | fn redact_image_urls(value: &mut serde_json::Value) {
function truncate_data_url (line 521) | fn truncate_data_url(url: &str) -> Option<String> {
function langfuse_json (line 543) | pub(crate) fn langfuse_json<T>(_value: &T) -> Option<String> {
function tools_to_openai (line 547) | fn tools_to_openai(spec: &ToolSpec) -> Result<ChatCompletionTools> {
function message_to_openai (line 564) | fn message_to_openai(
function user_parts_to_openai (line 638) | fn user_parts_to_openai(
function part_to_openai_user_content_part (line 649) | fn part_to_openai_user_content_part(
function source_to_openai_url (line 694) | fn source_to_openai_url(source: &ChatMessageContentSource) -> Result<Str...
type WeatherArgs (line 725) | struct WeatherArgs {
type NestedCommentArgs (line 732) | struct NestedCommentArgs {
type NestedCommentRequest (line 739) | struct NestedCommentRequest {
function test_tools_to_openai_sets_additional_properties_false (line 753) | fn test_tools_to_openai_sets_additional_properties_false() {
function test_tools_to_openai_sets_nested_required_for_typed_request_objects (line 784) | fn test_tools_to_openai_sets_nested_required_for_typed_request_objects() {
function test_message_to_openai_with_image_parts (line 837) | fn test_message_to_openai_with_image_parts() {
function test_message_to_openai_with_image_bytes_source (line 864) | fn test_message_to_openai_with_image_bytes_source() {
function test_complete (line 893) | async fn test_complete() {
function test_complete_responses_api (line 990) | async fn test_complete_responses_api() {
function test_complete_with_all_default_settings (line 1100) | async fn test_complete_with_all_default_settings() {
function test_complete_with_tools_sets_auto_choice_and_parallel_calls (line 1197) | async fn test_complete_with_tools_sets_auto_choice_and_parallel_calls() {
function test_complete_stream_happy_path (line 1296) | async fn test_complete_stream_happy_path() {
function test_complete_stream_delta_only_mode (line 1333) | async fn test_complete_stream_delta_only_mode() {
function test_complete_stream_invalid_tool_schema_errors (line 1382) | async fn test_complete_stream_invalid_tool_schema_errors() {
function test_complete_invalid_tool_schema_errors (line 1399) | async fn test_complete_invalid_tool_schema_errors() {
function test_complete_stream_rate_limit_transient_error (line 1416) | async fn test_complete_stream_rate_limit_transient_error() {
function test_message_to_openai_tool_output_without_content (line 1446) | fn test_message_to_openai_tool_output_without_content() {
function test_message_to_openai_assistant_with_tool_calls_and_text (line 1472) | fn test_message_to_openai_assistant_with_tool_calls_and_text() {
function test_complete_stream_model_missing_errors_immediately (line 1503) | async fn test_complete_stream_model_missing_errors_immediately() {
function test_track_completion_invokes_on_usage_callback (line 1523) | async fn test_track_completion_invokes_on_usage_callback() {
FILE: swiftide-integrations/src/openai/embed.rs
method embed (line 23) | async fn embed(&self, input: Vec<String>) -> Result<Embeddings, Language...
function test_embed_returns_error_when_model_missing (line 78) | async fn test_embed_returns_error_when_model_missing() {
function test_embed_success (line 86) | async fn test_embed_success() {
FILE: swiftide-integrations/src/openai/mod.rs
type OpenAI (line 72) | pub type OpenAI = GenericOpenAI<OpenAIConfig>;
method builder (line 298) | pub fn builder() -> OpenAIBuilder {
type OpenAIBuilder (line 73) | pub type OpenAIBuilder = GenericOpenAIBuilder<OpenAIConfig>;
type GenericOpenAI (line 78) | pub struct GenericOpenAI<
function fmt (line 130) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type Options (line 144) | pub struct Options {
method builder (line 212) | pub fn builder() -> OptionsBuilder {
method merge (line 217) | pub fn merge(&mut self, other: &Options) {
method from (line 258) | fn from(value: OptionsBuilder) -> Self {
method from (line 277) | fn from(value: &mut OptionsBuilder) -> Self {
function on_usage (line 312) | pub fn on_usage<F>(&mut self, func: F) -> &mut Self
function on_usage_async (line 327) | pub fn on_usage_async<F>(&mut self, func: F) -> &mut Self
function client (line 352) | pub fn client(&mut self, client: async_openai::Client<C>) -> &mut Self {
function default_embed_model (line 364) | pub fn default_embed_model(&mut self, model: impl Into<String>) -> &mut ...
function for_end_user (line 377) | pub fn for_end_user(&mut self, user: impl Into<String>) -> &mut Self {
function parallel_tool_calls (line 394) | pub fn parallel_tool_calls(&mut self, parallel_tool_calls: Option<bool>)...
function default_prompt_model (line 413) | pub fn default_prompt_model(&mut self, model: impl Into<String>) -> &mut...
function default_options (line 428) | pub fn default_options(&mut self, options: impl Into<Options>) -> &mut S...
function estimate_tokens (line 447) | pub async fn estimate_tokens(&self, value: impl Estimatable) -> Result<u...
function with_default_prompt_model (line 451) | pub fn with_default_prompt_model(&mut self, model: impl Into<String>) ->...
function with_default_embed_model (line 459) | pub fn with_default_embed_model(&mut self, model: impl Into<String>) -> ...
function client (line 468) | pub fn client(&self) -> &Arc<async_openai::Client<C>> {
function options (line 473) | pub fn options(&self) -> &Options {
function options_mut (line 478) | pub fn options_mut(&mut self) -> &mut Options {
function is_responses_api_enabled (line 483) | pub fn is_responses_api_enabled(&self) -> bool {
function chat_completion_request_defaults (line 487) | fn chat_completion_request_defaults(&self) -> CreateChatCompletionReques...
function embed_request_defaults (line 523) | fn embed_request_defaults(&self) -> CreateEmbeddingRequestArgs {
function openai_error_to_language_model_error (line 540) | pub fn openai_error_to_language_model_error(e: OpenAIError) -> LanguageM...
function is_rate_limited_stream_error (line 576) | fn is_rate_limited_stream_error(error: &StreamError) -> bool {
function test_default_embed_and_prompt_model (line 599) | fn test_default_embed_and_prompt_model() {
function test_use_responses_api_flag (line 630) | fn test_use_responses_api_flag() {
function test_context_length_exceeded_error (line 637) | fn test_context_length_exceeded_error() {
function test_api_error_permanent (line 657) | fn test_api_error_permanent() {
function test_file_save_error_is_permanent (line 677) | fn test_file_save_error_is_permanent() {
function test_file_read_error_is_permanent (line 690) | fn test_file_read_error_is_permanent() {
function test_stream_error_is_permanent (line 703) | fn test_stream_error_is_permanent() {
function test_invalid_argument_is_permanent (line 717) | fn test_invalid_argument_is_permanent() {
function test_options_merge_overrides_set_fields (line 730) | fn test_options_merge_overrides_set_fields() {
function test_chat_completion_request_defaults_omits_reasoning_effort (line 752) | fn test_chat_completion_request_defaults_omits_reasoning_effort() {
function test_embed_request_defaults_sets_user_and_dimensions (line 792) | fn test_embed_request_defaults_sets_user_and_dimensions() {
FILE: swiftide-integrations/src/openai/responses_api.rs
type LmResult (line 26) | type LmResult<T> = Result<T, LanguageModelError>;
function build_responses_request_from_chat (line 28) | pub(super) fn build_responses_request_from_chat<C>(
function base_request_args (line 65) | fn base_request_args<C>(client: &GenericOpenAI<C>, model: &str) -> LmRes...
function convert_metadata (line 127) | fn convert_metadata(value: &serde_json::Value) -> Option<HashMap<String,...
function tool_spec_to_responses_tool (line 144) | fn tool_spec_to_responses_tool(spec: &ToolSpec) -> Result<Tool> {
function chat_messages_to_input_items (line 159) | fn chat_messages_to_input_items(
function message_item (line 259) | fn message_item(role: Role, content: String) -> LmResult<InputItem> {
function message_item_with_content (line 263) | fn message_item_with_content(role: Role, content: EasyInputContent) -> L...
function user_parts_to_easy_input_content (line 274) | fn user_parts_to_easy_input_content(
function part_to_input_content (line 284) | fn part_to_input_content(part: &ChatMessageContentPart) -> LmResult<Inpu...
function normalize_responses_function_call_id (line 363) | fn normalize_responses_function_call_id(id: &str) -> String {
type ResponsesStreamState (line 374) | pub(super) struct ResponsesStreamState {
method apply_event (line 387) | fn apply_event(
method emit (line 510) | fn emit(&mut self, stream_full: bool, finished: bool) -> ResponsesStre...
method take_final (line 532) | fn take_final(&mut self, stream_full: bool) -> Option<ResponsesStreamI...
type ResponsesStreamItem (line 380) | pub(super) struct ResponsesStreamItem {
function responses_stream_adapter (line 542) | pub(super) fn responses_stream_adapter(
type ResponsesStreamAdapter (line 549) | pub(super) struct ResponsesStreamAdapter {
method new (line 557) | fn new(stream: ResponseStream, stream_full: bool) -> Self {
type Item (line 568) | type Item = LmResult<ResponsesStreamItem>;
method poll_next (line 570) | fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<...
function response_to_chat_completion (line 617) | pub(super) fn response_to_chat_completion(response: &Response) -> LmResu...
function metadata_to_chat_completion (line 651) | pub(super) fn metadata_to_chat_completion(
function collect_message_text_from_items (line 682) | fn collect_message_text_from_items(output: &[OutputItem]) -> Option<Stri...
function collect_message_text_from_message (line 705) | fn collect_message_text_from_message(message: &OutputMessage) -> Option<...
function collect_tool_calls_from_items (line 724) | fn collect_tool_calls_from_items(output: &[OutputItem]) -> LmResult<Vec<...
function collect_reasoning_items_from_items (line 733) | fn collect_reasoning_items_from_items(output: &[OutputItem]) -> Vec<Reas...
function tool_call_from_function_call (line 776) | fn tool_call_from_function_call(function_call: &FunctionToolCall) -> LmR...
function tool_calls_from_iter (line 795) | fn tool_calls_from_iter<'a, I>(calls: I) -> LmResult<Vec<ToolCall>>
function function_call_identifier (line 805) | fn function_call_identifier(function_call: &FunctionToolCall) -> &str {
function build_responses_request_from_prompt (line 816) | pub(super) fn build_responses_request_from_prompt<C>(
function build_responses_request_from_prompt_with_schema (line 842) | pub(super) fn build_responses_request_from_prompt_with_schema<C>(
function expect_emit (line 900) | fn expect_emit(
function expect_no_emit (line 911) | fn expect_no_emit(
function sample_usage (line 922) | fn sample_usage() -> ResponsesUsage {
type WeatherArgs (line 936) | struct WeatherArgs {
type NestedCommentArgs (line 943) | struct NestedCommentArgs {
type NestedCommentRequest (line 950) | struct NestedCommentRequest {
function sample_tool_spec (line 963) | fn sample_tool_spec() -> ToolSpec {
function sample_tool_spec_named (line 972) | fn sample_tool_spec_named(name: &str) -> ToolSpec {
function test_user_parts_to_easy_input_content_with_image (line 982) | fn test_user_parts_to_easy_input_content_with_image() {
function output_message (line 999) | fn output_message(id: &str, parts: &[&str]) -> OutputMessage {
function response_with_message_tool_reasoning (line 1017) | fn response_with_message_tool_reasoning(message: &str) -> Response {
function test_build_responses_request_includes_tools_and_options (line 1051) | fn test_build_responses_request_includes_tools_and_options() {
function test_build_responses_request_sets_additional_properties_false_for_custom_tool_schema (line 1110) | fn test_build_responses_request_sets_additional_properties_false_for_cus...
function test_build_responses_request_sets_nested_required_for_typed_request_objects (line 1170) | fn test_build_responses_request_sets_nested_required_for_typed_request_o...
function test_build_responses_request_reasoning_is_stateless_with_summary_and_encrypted_content (line 1236) | fn test_build_responses_request_reasoning_is_stateless_with_summary_and_...
function test_chat_messages_to_input_items_keeps_tool_calls_without_content (line 1264) | fn test_chat_messages_to_input_items_keeps_tool_calls_without_content() {
function test_chat_messages_to_input_items_includes_reasoning_with_encrypted_content (line 1290) | fn test_chat_messages_to_input_items_includes_reasoning_with_encrypted_c...
function test_chat_messages_to_input_items_ignores_empty_assistant (line 1316) | fn test_chat_messages_to_input_items_ignores_empty_assistant() {
function test_tool_call_from_function_call_uses_id_when_call_id_missing (line 1324) | fn test_tool_call_from_function_call_uses_id_when_call_id_missing() {
function test_collect_message_text_helpers_join_parts (line 1340) | fn test_collect_message_text_helpers_join_parts() {
function test_metadata_to_chat_completion_respects_existing_fields (line 1363) | fn test_metadata_to_chat_completion_respects_existing_fields() {
function test_tool_output_preserves_structured_values (line 1427) | fn test_tool_output_preserves_structured_values() {
function test_response_to_chat_completion_maps_outputs (line 1474) | fn test_response_to_chat_completion_maps_outputs() {
function test_response_to_chat_completion_collects_reasoning_summary_and_encrypted_content (line 1520) | fn test_response_to_chat_completion_collects_reasoning_summary_and_encry...
function test_stream_accumulator_handles_text_and_tool_events (line 1556) | fn test_stream_accumulator_handles_text_and_tool_events() {
function test_stream_state_take_final_only_once (line 1668) | fn test_stream_state_take_final_only_once() {
function test_stream_state_ignores_events_after_completion (line 1675) | fn test_stream_state_ignores_events_after_completion() {
function test_stream_state_message_item_added_collects_text (line 1717) | fn test_stream_state_message_item_added_collects_text() {
function test_stream_state_output_item_done_emits_tool_call (line 1746) | fn test_stream_state_output_item_done_emits_tool_call() {
function test_stream_state_duplicate_arguments_done_no_emit (line 1795) | fn test_stream_state_duplicate_arguments_done_no_emit() {
function test_stream_state_response_failed_and_error (line 1847) | fn test_stream_state_response_failed_and_error() {
function test_response_to_chat_completion_failed_status_errors (line 1886) | fn test_response_to_chat_completion_failed_status_errors() {
function test_convert_metadata_rejects_non_string_values (line 1905) | fn test_convert_metadata_rejects_non_string_values() {
function test_base_request_args_runs_with_seed_and_presence_penalty (line 1911) | fn test_base_request_args_runs_with_seed_and_presence_penalty() {
function test_normalize_responses_function_call_id (line 1927) | fn test_normalize_responses_function_call_id() {
FILE: swiftide-integrations/src/openai/simple_prompt.rs
method prompt (line 51) | async fn prompt(&self, prompt: Prompt) -> Result<String, LanguageModelEr...
function prompt_via_responses_api (line 129) | async fn prompt_via_responses_api(&self, prompt: Prompt) -> Result<Strin...
function test_prompt_errors_when_model_missing (line 175) | async fn test_prompt_errors_when_model_missing() {
function test_prompt_via_responses_api_returns_message (line 182) | async fn test_prompt_via_responses_api_returns_message() {
function test_prompt_via_responses_api_missing_output_errors (line 249) | async fn test_prompt_via_responses_api_missing_output_errors() {
FILE: swiftide-integrations/src/openai/structured_prompt.rs
method structured_prompt_dyn (line 60) | async fn structured_prompt_dyn(
function structured_prompt_via_responses_api (line 153) | async fn structured_prompt_via_responses_api(
type SimpleOutput (line 221) | struct SimpleOutput {
function setup_client (line 225) | async fn setup_client() -> (MockServer, OpenAI) {
function test_structured_prompt_with_wiremock (line 294) | async fn test_structured_prompt_with_wiremock() {
function test_structured_prompt_with_wiremock_as_box (line 310) | async fn test_structured_prompt_with_wiremock_as_box() {
function test_structured_prompt_via_responses_api (line 330) | async fn test_structured_prompt_via_responses_api() {
function test_structured_prompt_via_responses_api_invalid_json_errors (line 390) | async fn test_structured_prompt_via_responses_api_invalid_json_errors() {
FILE: swiftide-integrations/src/openai/tool_schema.rs
type SchemaNormalizer (line 5) | type SchemaNormalizer = fn(&mut Value) -> Result<(), OpenAiToolSchemaErr...
type SchemaValidator (line 6) | type SchemaValidator = fn(&Value) -> Result<(), OpenAiToolSchemaError>;
type OpenAiToolSchema (line 9) | pub(super) struct OpenAiToolSchema(Value);
method into_value (line 12) | pub(super) fn into_value(self) -> Value {
type Error (line 18) | type Error = OpenAiToolSchemaError;
method try_from (line 20) | fn try_from(spec: &ToolSpec) -> Result<Self, Self::Error> {
type OpenAiToolSchemaError (line 27) | pub(super) enum OpenAiToolSchemaError {
method from (line 37) | fn from(value: ToolSpecError) -> Self {
type OpenAiSchemaPipeline (line 42) | struct OpenAiSchemaPipeline;
method apply (line 45) | fn apply(mut schema: Value) -> Result<Value, OpenAiToolSchemaError> {
function strip_schema_metadata (line 63) | fn strip_schema_metadata(schema: &mut Value) -> Result<(), OpenAiToolSch...
function strip_rust_numeric_formats (line 70) | fn strip_rust_numeric_formats(schema: &mut Value) -> Result<(), OpenAiTo...
function complete_required_arrays (line 85) | fn complete_required_arrays(schema: &mut Value) -> Result<(), OpenAiTool...
function validate_openai_compatibility (line 100) | fn validate_openai_compatibility(schema: &Value) -> Result<(), OpenAiToo...
function is_rust_numeric_format (line 119) | fn is_rust_numeric_format(format: &str) -> bool {
function walk_schema_mut (line 138) | fn walk_schema_mut(
function walk_schema_children_mut (line 151) | fn walk_schema_children_mut(
function walk_schema (line 185) | fn walk_schema(
function walk_schema_children (line 198) | fn walk_schema_children(
type SchemaPath (line 233) | struct SchemaPath(Vec<String>);
method root (line 236) | fn root() -> Self {
method with_key (line 240) | fn with_key(&self, key: impl Into<String>) -> Self {
method with_index (line 246) | fn with_index(&self, key: impl Into<String>, index: usize) -> Self {
method fmt (line 255) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type NestedCommentArgs (line 270) | struct NestedCommentArgs {
type NestedCommentRequest (line 276) | struct NestedCommentRequest {
function openai_tool_schema_strips_schema_metadata_and_rust_formats (line 290) | fn openai_tool_schema_strips_schema_metadata_and_rust_formats() {
function openai_tool_schema_adds_recursive_required_arrays (line 324) | fn openai_tool_schema_adds_recursive_required_arrays() {
function openai_tool_schema_rejects_non_nullable_one_of (line 348) | fn openai_tool_schema_rejects_non_nullable_one_of() {
FILE: swiftide-integrations/src/parquet/loader.rs
type Output (line 15) | type Output = String;
method into_stream (line 17) | fn into_stream(self) -> IndexingStream<String> {
method into_stream_boxed (line 98) | fn into_stream_boxed(self: Box<Self>) -> IndexingStream<String> {
function test_parquet_loader (line 112) | async fn test_parquet_loader() {
FILE: swiftide-integrations/src/parquet/mod.rs
type Parquet (line 19) | pub struct Parquet {
method builder (line 27) | pub fn builder() -> ParquetBuilder {
FILE: swiftide-integrations/src/pgvector/fixtures.rs
type PgVectorTestData (line 71) | pub(crate) struct PgVectorTestData<'a> {
function to_node (line 84) | pub(crate) fn to_node(&self) -> indexing::TextNode {
function create_test_vector (line 102) | pub(crate) fn create_test_vector(
type TestContext (line 132) | pub(crate) struct TestContext {
method setup_with_cfg (line 142) | pub(crate) async fn setup_with_cfg(
FILE: swiftide-integrations/src/pgvector/mod.rs
constant DB_POOL_CONN_MAX (line 43) | const DB_POOL_CONN_MAX: u32 = 10;
constant DB_POOL_CONN_RETRY_MAX (line 46) | const DB_POOL_CONN_RETRY_MAX: u32 = 3;
constant DB_POOL_CONN_RETRY_DELAY_SECS (line 49) | const DB_POOL_CONN_RETRY_DELAY_SECS: u64 = 3;
constant BATCH_SIZE (line 52) | const BATCH_SIZE: usize = 50;
type PgVector (line 61) | pub struct PgVector {
method fmt (line 104) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
method builder (line 119) | pub fn builder() -> PgVectorBuilder {
method get_pool (line 137) | pub async fn get_pool(&self) -> Result<&PgPool> {
method get_table_name (line 141) | pub fn get_table_name(&self) -> &str {
method with_vector (line 156) | pub fn with_vector(&mut self, config: impl Into<VectorConfig>) -> &mut S...
method with_metadata (line 178) | pub fn with_metadata(&mut self, config: impl Into<MetadataConfig>) -> &m...
method default_fields (line 187) | pub fn default_fields() -> Vec<FieldConfig> {
function test_metadata_filter_with_vector_search (line 206) | async fn test_metadata_filter_with_vector_search() {
function test_vector_similarity_search_accuracy (line 282) | async fn test_vector_similarity_search_accuracy() {
function test_persist_nodes (line 390) | async fn test_persist_nodes(
FILE: swiftide-integrations/src/pgvector/persist.rs
type Input (line 22) | type Input = String;
type Output (line 23) | type Output = String;
method setup (line 25) | async fn setup(&self) -> Result<()> {
method store (line 57) | async fn store(&self, node: TextNode) -> Result<TextNode> {
method batch_store (line 67) | async fn batch_store(&self, nodes: Vec<TextNode>) -> IndexingStream<Stri...
method batch_size (line 71) | fn batch_size(&self) -> Option<usize> {
function test_persist_setup_no_error_when_table_exists (line 83) | async fn test_persist_setup_no_error_when_table_exists() {
FILE: swiftide-integrations/src/pgvector/pgv_table_types.rs
type VectorConfig (line 24) | pub struct VectorConfig {
method new (line 30) | pub fn new(embedded_field: &EmbeddedField) -> Self {
method from (line 42) | fn from(val: EmbeddedField) -> Self {
type MetadataConfig (line 52) | pub struct MetadataConfig {
method new (line 58) | pub fn new<T: Into<String>>(original_field: T) -> Self {
method from (line 68) | fn from(val: T) -> Self {
type FieldConfig (line 78) | pub enum FieldConfig {
method field_name (line 90) | pub fn field_name(&self) -> &str {
type BulkUpsertData (line 104) | struct BulkUpsertData<'a> {
type FieldMapping (line 112) | struct FieldMapping<'a> {
function new (line 118) | fn new(fields: &'a [FieldConfig], size: usize) -> Self {
function get_metadata_index (line 148) | fn get_metadata_index(&self, field: &str) -> Option<usize> {
function get_vector_index (line 155) | fn get_vector_index(&self, field: &str) -> Option<usize> {
method generate_create_table_sql (line 175) | pub fn generate_create_table_sql(&self) -> Result<String> {
method create_index_sql (line 211) | pub fn create_index_sql(&self) -> Result<String> {
method store_nodes (line 251) | pub async fn store_nodes(&self, nodes: &[TextNode]) -> Result<()> {
method prepare_bulk_data (line 276) | fn prepare_bulk_data<'a>(&'a self, nodes: &'a [TextNode]) -> Result<Bulk...
method generate_unnest_upsert_sql (line 331) | pub(crate) fn generate_unnest_upsert_sql(&self) -> Result<String> {
method bind_bulk_data_to_query (line 389) | fn bind_bulk_data_to_query<'a>(
method get_vector_column_name (line 426) | pub fn get_vector_column_name(&self) -> Result<String> {
method normalize_field_name (line 444) | pub fn normalize_field_name(field: &str) -> String {
method is_valid_identifier (line 470) | pub(crate) fn is_valid_identifier(identifier: &str) -> bool {
method is_reserved_keyword (line 492) | pub(crate) fn is_reserved_keyword(word: &str) -> bool {
method create_pool (line 507) | async fn create_pool(&self) -> Result<PgPool> {
method pool_get_or_initialize (line 542) | pub async fn pool_get_or_initialize(&self) -> Result<&PgPool> {
function test_valid_identifiers (line 564) | fn test_valid_identifiers() {
function test_invalid_identifiers (line 572) | fn test_invalid_identifiers() {
FILE: swiftide-integrations/src/pgvector/retrieve.rs
type VectorSearchResult (line 20) | struct VectorSearchResult {
method from_row (line 33) | fn from_row(row: &sqlx::postgres::PgRow) -> Result<Self, sqlx::Error> {
method from (line 27) | fn from(val: VectorSearchResult) -> Self {
method retrieve (line 65) | async fn retrieve(
method retrieve (line 143) | async fn retrieve(
method retrieve (line 159) | async fn retrieve(
function test_retrieve_multiple_docs_and_filter (line 197) | async fn test_retrieve_multiple_docs_and_filter() {
function test_retrieve_docs_with_metadata (line 260) | async fn test_retrieve_docs_with_metadata() {
FILE: swiftide-integrations/src/qdrant/indexing_node.rs
type Error (line 23) | type Error = anyhow::Error;
function try_into (line 35) | fn try_into(self) -> Result<qdrant::PointStruct> {
function try_create_vectors (line 71) | fn try_create_vectors(
function try_into_point_struct_test (line 192) | fn try_into_point_struct_test(
FILE: swiftide-integrations/src/qdrant/mod.rs
constant DEFAULT_COLLECTION_NAME (line 21) | const DEFAULT_COLLECTION_NAME: &str = "swiftide";
constant DEFAULT_QDRANT_URL (line 22) | const DEFAULT_QDRANT_URL: &str = "http://localhost:6334";
constant DEFAULT_BATCH_SIZE (line 23) | const DEFAULT_BATCH_SIZE: usize = 50;
type Qdrant (line 37) | pub struct Qdrant {
method builder (line 65) | pub fn builder() -> QdrantBuilder {
method try_from_url (line 85) | pub fn try_from_url(url: impl AsRef<str>) -> Result<QdrantBuilder> {
method create_index_if_not_exists (line 105) | pub async fn create_index_if_not_exists(&self) -> Result<()> {
method create_vectors_config (line 132) | fn create_vectors_config(&self) -> Result<qdrant_client::qdrant::vecto...
method create_sparse_vectors_config (line 157) | fn create_sparse_vectors_config(&self) -> Option<qdrant::SparseVectorC...
method create_vector_params (line 171) | fn create_vector_params(&self, config: &VectorConfig) -> qdrant::Vecto...
method client (line 184) | pub fn client(&self) -> &Arc<qdrant_client::Qdrant> {
method fmt (line 250) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method default_client (line 191) | fn default_client(&self) -> Result<Arc<qdrant_client::Qdrant>> {
method with_vector (line 209) | pub fn with_vector(mut self, vector: impl Into<VectorConfig>) -> QdrantB...
method with_sparse_vector (line 227) | pub fn with_sparse_vector(mut self, vector: impl Into<SparseVectorConfig...
method default_vectors (line 243) | fn default_vectors() -> HashMap<EmbeddedField, VectorConfig> {
type VectorConfig (line 263) | pub struct VectorConfig {
method builder (line 280) | pub fn builder() -> VectorConfigBuilder {
method from (line 286) | fn from(value: EmbeddedField) -> Self {
type SparseVectorConfig (line 296) | pub struct SparseVectorConfig {
method from (line 301) | fn from(value: EmbeddedField) -> Self {
type Distance (line 308) | pub type Distance = qdrant::Distance;
type NodeWithVectors (line 311) | struct NodeWithVectors<'a> {
function new (line 317) | pub fn new(node: &'a TextNode, vector_fields: HashSet<&'a EmbeddedField>...
FILE: swiftide-integrations/src/qdrant/persist.rs
type Input (line 17) | type Input = String;
type Output (line 18) | type Output = String;
method batch_size (line 25) | fn batch_size(&self) -> Option<usize> {
method setup (line 39) | async fn setup(&self) -> Result<()> {
method store (line 60) | async fn store(&self, node: TextNode) -> Result<TextNode> {
method batch_store (line 89) | async fn batch_store(&self, nodes: Vec<TextNode>) -> IndexingStream<Stri...
method vector_fields (line 117) | fn vector_fields(&self) -> HashSet<&EmbeddedField> {
FILE: swiftide-integrations/src/qdrant/retrieve.rs
method retrieve (line 24) | async fn retrieve(
method retrieve (line 68) | async fn retrieve(
method retrieve (line 90) | async fn retrieve(
function scored_point_into_document (line 140) | fn scored_point_into_document(scored_point: ScoredPoint) -> Result<Docum...
function setup (line 167) | async fn setup() -> (
function test_retrieve_multiple_docs_and_filter (line 213) | async fn test_retrieve_multiple_docs_and_filter() {
function test_hybrid_search (line 272) | async fn test_hybrid_search() {
function test_hybrid_search_with_filter (line 290) | async fn test_hybrid_search_with_filter() {
FILE: swiftide-integrations/src/redb/mod.rs
type Redb (line 29) | pub struct Redb {
method fmt (line 49) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method builder (line 73) | pub fn builder() -> RedbBuilder {
method node_key (line 76) | pub fn node_key(&self, node: &swiftide_core::indexing::TextNode) -> St...
method table_definition (line 80) | pub fn table_definition(&self) -> redb::TableDefinition<'_, String, bo...
method database (line 84) | pub fn database(&self) -> &redb::Database {
method default_database (line 60) | fn default_database(&self) -> Result<redb::Database> {
FILE: swiftide-integrations/src/redb/node_cache.rs
type Input (line 31) | type Input = String;
method get (line 33) | async fn get(&self, node: &TextNode) -> bool {
method set (line 65) | async fn set(&self, node: &TextNode) {
method clear (line 77) | async fn clear(&self) -> Result<()> {
function setup_redb (line 93) | fn setup_redb() -> Redb {
function test_get_set (line 102) | async fn test_get_set() {
function test_clear (line 110) | async fn test_clear() {
FILE: swiftide-integrations/src/redis/message_history.rs
method history (line 9) | async fn history(&self) -> Result<Vec<ChatMessage>> {
method push_owned (line 29) | async fn push_owned(&self, item: ChatMessage) -> Result<()> {
method extend_owned (line 43) | async fn extend_owned(&self, items: Vec<ChatMessage>) -> Result<()> {
method overwrite (line 61) | async fn overwrite(&self, items: Vec<ChatMessage>) -> Result<()> {
function serialize_messages (line 87) | fn serialize_messages(items: Vec<ChatMessage>) -> Result<Vec<String>> {
function start_redis (line 100) | async fn start_redis() -> (String, ContainerAsync<GenericImage>) {
Condensed preview — 350 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,043K chars).
[
{
"path": ".github/ISSUE_TEMPLATE/bug_report.md",
"chars": 479,
"preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: \"\"\nlabels: \"\"\nassignees: \"\"\n---\n\n**Describe the bu"
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.md",
"chars": 595,
"preview": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Is your fea"
},
{
"path": ".github/dependabot.yml",
"chars": 881,
"preview": "# To get started with Dependabot version updates, you'll need to specify which\n# package ecosystems to update and where "
},
{
"path": ".github/workflows/bench.yml",
"chars": 965,
"preview": "name: Bench\non:\n push:\n branches:\n - master\n\npermissions:\n contents: write\n deployments: write\n\njobs:\n bench"
},
{
"path": ".github/workflows/coverage.yml",
"chars": 1129,
"preview": "name: Coverage\n\non:\n pull_request:\n push:\n branches:\n - master\n\nconcurrency:\n group: ${{ github.workflow }}-$"
},
{
"path": ".github/workflows/discord.yml",
"chars": 713,
"preview": "on:\n release:\n types: [published]\n\njobs:\n github-releases-to-discord:\n runs-on: ubuntu-latest\n steps:\n -"
},
{
"path": ".github/workflows/lint.yml",
"chars": 1989,
"preview": "name: CI\n\non:\n pull_request:\n merge_group:\n push:\n branches:\n - master\n\nconcurrency:\n group: ${{ github.work"
},
{
"path": ".github/workflows/pr.yml",
"chars": 2928,
"preview": "name: Check Pull Requests\n\non:\n pull_request_target:\n types:\n - opened\n - edited\n - synchronize\n "
},
{
"path": ".github/workflows/release.yml",
"chars": 829,
"preview": "name: Release\n\npermissions:\n pull-requests: write\n contents: write\n\non:\n push:\n branches:\n - master\n\njobs:\n "
},
{
"path": ".github/workflows/test.yml",
"chars": 1318,
"preview": "name: CI\n\non:\n pull_request:\n merge_group:\n push:\n branches:\n - master\n\nconcurrency:\n group: ${{ github.work"
},
{
"path": ".gitignore",
"chars": 495,
"preview": "# Generated by Cargo\n# will have compiled files and executables\ndebug/\ntarget/\n\n# Remove Cargo.lock from gitignore if cr"
},
{
"path": ".markdownlint.yaml",
"chars": 207,
"preview": "# configuration for https://github.com/DavidAnson/markdownlint\n\nfirst-line-heading: false\nno-inline-html: false\nline-len"
},
{
"path": "AGENTS.md",
"chars": 3728,
"preview": "# Repository Guidelines\n\n## Project Structure & Module Organization\n\nSwiftide is a Rust workspace driven by the library "
},
{
"path": "CHANGELOG.md",
"chars": 128648,
"preview": "# Changelog\n\nAll notable changes to this project will be documented in this file.\n\n## [0.32.1](https://github.com/bosun-"
},
{
"path": "CONTRIBUTING.md",
"chars": 1843,
"preview": "# Contribution guidelines\n\n\nSwiftide is in a very early stage and we are aware that we do lack features for the wider co"
},
{
"path": "Cargo.toml",
"chars": 6755,
"preview": "cargo-features = [\"edition2024\"]\n\n[workspace]\nmembers = [\"swiftide\", \"swiftide-*\", \"examples\", \"benchmarks\"]\ndefault-mem"
},
{
"path": "LICENSE",
"chars": 1065,
"preview": "MIT License\n\nCopyright (c) 2024 Bosun.ai\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\no"
},
{
"path": "README.md",
"chars": 17642,
"preview": "<details>\n <summary>Table of Contents</summary>\n\n<!--toc:start-->\n\n- [What is Swiftide?](#what-is-swiftide)\n - [High l"
},
{
"path": "benchmarks/Cargo.toml",
"chars": 956,
"preview": "cargo-features = [\"edition2024\"]\n\n[package]\nname = \"benchmarks\"\npublish = false\nversion.workspace = true\nedition.workspa"
},
{
"path": "benchmarks/fileloader.rs",
"chars": 880,
"preview": "use std::hint::black_box;\n\nuse anyhow::Result;\nuse criterion::{Criterion, criterion_group, criterion_main};\nuse futures_"
},
{
"path": "benchmarks/local_pipeline.rs",
"chars": 829,
"preview": "use anyhow::Result;\nuse criterion::{Criterion, criterion_group, criterion_main};\nuse swiftide::{\n indexing::Pipeline,"
},
{
"path": "benchmarks/node_cache_comparison.rs",
"chars": 2380,
"preview": "use anyhow::Result;\nuse criterion::{BenchmarkId, Criterion, criterion_group, criterion_main};\nuse swiftide::indexing::tr"
},
{
"path": "benchmarks/output.txt",
"chars": 169,
"preview": "test load_1 ... bench: 6 ns/iter (+/- 0)\n\ntest load_10 ... bench: 6 ns/iter (+/- 0)\n\ntest run_local_"
},
{
"path": "cliff.toml",
"chars": 3471,
"preview": "[remote.github]\nowner = \"bosun-ai\"\nrepo = \"swiftide\"\n\n[git]\ncommit_parsers = [\n { message = \"(r|R)elease\", skip = true "
},
{
"path": "deny.toml",
"chars": 1438,
"preview": "[graph]\nall-features = true\n\n[licenses]\nconfidence-threshold = 0.8\nallow = [\n \"Apache-2.0\",\n \"BSD-2-Clause\",\n \"BSD-3-"
},
{
"path": "examples/Cargo.toml",
"chars": 3733,
"preview": "cargo-features = [\"edition2024\"]\n\n[package]\nname = \"swiftide-examples\"\npublish = false\nversion.workspace = true\nedition."
},
{
"path": "examples/agent_can_fail_custom_schema.rs",
"chars": 3276,
"preview": "//! Demonstrates how to replace the default failure arguments for `AgentCanFail` with a custom\n//! JSON schema and captu"
},
{
"path": "examples/agents_mcp_tools.rs",
"chars": 2567,
"preview": "//! This is an example of how to build a Swiftide agent with tools using the MCP protocol.\n//!\n//! The agent in this exa"
},
{
"path": "examples/agents_resume.rs",
"chars": 1288,
"preview": "//! This example illustrates how to resume an agent from existing messages.\nuse anyhow::Result;\nuse swiftide::agents::{s"
},
{
"path": "examples/agents_with_human_in_the_loop.rs",
"chars": 3233,
"preview": "//! This is an example of using a human in the loop pattern with switfide agents.\n//!\n//! In the example we send the too"
},
{
"path": "examples/aws_bedrock.rs",
"chars": 1689,
"preview": "//! # [Swiftide] Aws Bedrock example\n//!\n//! This example demonstrates how to use the `AwsBedrock` v2 integration to int"
},
{
"path": "examples/aws_bedrock_agent.rs",
"chars": 2445,
"preview": "//! # [Swiftide] AWS Bedrock Agent Example\n//!\n//! This example demonstrates a simple agent setup with `AwsBedrock` v2.\n"
},
{
"path": "examples/dashscope.rs",
"chars": 2023,
"preview": "use swiftide::{\n indexing::{\n self, EmbeddedField,\n loaders::FileLoader,\n transformers::{ChunkMa"
},
{
"path": "examples/describe_image.rs",
"chars": 1379,
"preview": "//! Demonstrates passing an image to Chat Completions using a data URL.\n//!\n//! Set the `OPENAI_API_KEY` environment var"
},
{
"path": "examples/fastembed.rs",
"chars": 1318,
"preview": "//! # [Swiftide] Indexing the Swiftide itself example\n//!\n//! This example demonstrates how to index the Swiftide codeba"
},
{
"path": "examples/fluvio.rs",
"chars": 2077,
"preview": "//! # [Swiftide] Loading data from Fluvio\n//!\n//! This example demonstrates how to index the Swiftide codebase itself.\n/"
},
{
"path": "examples/hello_agents.rs",
"chars": 4778,
"preview": "//! This is an example of how to build a Swiftide agent\n//!\n//! A swiftide agent runs completions in a loop, optionally "
},
{
"path": "examples/hybrid_search.rs",
"chars": 9234,
"preview": "//! # [Swiftide] Hybrid search with qudrant\n//!\n//! This example demonstrates how to do hybrid search with Qdrant with S"
},
{
"path": "examples/index_codebase.rs",
"chars": 2586,
"preview": "//! # [Swiftide] Indexing the Swiftide itself example\n//!\n//! This example demonstrates how to index the Swiftide codeba"
},
{
"path": "examples/index_codebase_reduced_context.rs",
"chars": 3038,
"preview": "//! # [Swiftide] Indexing the Swiftide itself example with reduced context size\n//!\n//! This example demonstrates how to"
},
{
"path": "examples/index_groq.rs",
"chars": 1869,
"preview": "//! # [Swiftide] Indexing with Groq\n//!\n//! This example demonstrates how to index the Swiftide codebase itself.\n//! Not"
},
{
"path": "examples/index_into_redis.rs",
"chars": 1972,
"preview": "//! # [Swiftide] Indexing the Swiftide itself example\n//!\n//! This example demonstrates how to index the Swiftide codeba"
},
{
"path": "examples/index_markdown_lots_of_metadata.rs",
"chars": 1965,
"preview": "//! # [Swiftide] Indexing the Swiftide README with lots of metadata\n//!\n//! This example demonstrates how to index the S"
},
{
"path": "examples/index_md_into_pgvector.rs",
"chars": 4950,
"preview": "/// This example demonstrates how to index markdown into PGVector\nuse std::path::PathBuf;\nuse swiftide::{\n indexing::"
},
{
"path": "examples/index_ollama.rs",
"chars": 1889,
"preview": "//! # [Swiftide] Indexing with Ollama\n//!\n//! This example demonstrates how to index the Swiftide codebase itself.\n//! N"
},
{
"path": "examples/kafka.rs",
"chars": 1629,
"preview": "//! # [Swiftide] Loading data from Kafka\n//!\n//! This example demonstrates how to index data from a Kafka topic and stor"
},
{
"path": "examples/lancedb.rs",
"chars": 2728,
"preview": "/// This example demonstrates how to use the LanceDB integration with Swiftide\nuse swiftide::{\n indexing::{\n s"
},
{
"path": "examples/langfuse.rs",
"chars": 1868,
"preview": "//! This is an example of using the langfuse integration with Swiftide.\n//!\n//! Langfuse is a platform for tracking and "
},
{
"path": "examples/query_pipeline.rs",
"chars": 1892,
"preview": "use swiftide::{\n indexing::{\n self,\n loaders::FileLoader,\n transformers::{ChunkMarkdown, Embed, "
},
{
"path": "examples/reranking.rs",
"chars": 2136,
"preview": "/// Demonstrates reranking retrieved documents with fastembed\n///\n/// When reranking, many more documents are retrieved "
},
{
"path": "examples/responses_api.rs",
"chars": 5154,
"preview": "use anyhow::{Context, Result};\nuse futures_util::StreamExt as _;\nuse schemars::JsonSchema;\nuse serde::{Deserialize, Seri"
},
{
"path": "examples/responses_api_reasoning.rs",
"chars": 2331,
"preview": "//! Simple agent example that enables reasoning summaries via the Responses API.\n\nuse anyhow::Result;\nuse swiftide::agen"
},
{
"path": "examples/scraping_index_to_markdown.rs",
"chars": 1168,
"preview": "//! # [Swiftide] Indexing the Swiftide README with lots of metadata\n//!\n//! This example demonstrates how to index the S"
},
{
"path": "examples/stop_with_args_custom_schema.rs",
"chars": 2998,
"preview": "//! Demonstrates how to plug a custom JSON schema into the stop tool for an OpenAI-powered agent.\n//!\n//! Set the `OPENA"
},
{
"path": "examples/store_multiple_vectors.rs",
"chars": 2900,
"preview": "//! # [Swiftide] Ingesting file with multiple metadata stored as named vectors\n//!\n//! This example demonstrates how to "
},
{
"path": "examples/streaming_agents.rs",
"chars": 2152,
"preview": "//! This example demonstrates how to stream responses from an agent\n//!\n//! By default, for convenience the accumulated "
},
{
"path": "examples/structured_prompt.rs",
"chars": 1430,
"preview": "use anyhow::Result;\nuse schemars::JsonSchema;\nuse serde::{Deserialize, Serialize};\nuse swiftide::{integrations, traits::"
},
{
"path": "examples/tasks.rs",
"chars": 1928,
"preview": "//! This example illustrates how to set up a basic tasks\n//!\n//! Tasks follow a graph model where each output of a node"
},
{
"path": "examples/tool_custom_schema.rs",
"chars": 2016,
"preview": "use std::borrow::Cow;\n\nuse anyhow::Result;\nuse schemars::{JsonSchema, Schema, schema_for};\nuse serde::{Deserialize, Seri"
},
{
"path": "examples/usage_metrics.rs",
"chars": 6691,
"preview": "//! Swiftide can emit usage metrics using `metrics-rs`.\n//!\n//! For metrics to be emitted, the `metrics` feature must be"
},
{
"path": "release-plz.toml",
"chars": 3694,
"preview": "[workspace]\nchangelog_path = \"./CHANGELOG.md\"\n#changelog_config = \"cliff.toml\"\ngit_tag_name = \"v{{ version }}\"\nchangelog"
},
{
"path": "renovate.json",
"chars": 114,
"preview": "{\n \"$schema\": \"https://docs.renovatebot.com/renovate-schema.json\",\n \"extends\": [\n \"config:recommended\"\n ]\n}\n"
},
{
"path": "rust-toolchain.toml",
"chars": 31,
"preview": "[toolchain]\nchannel = \"stable\"\n"
},
{
"path": "rustfmt.toml",
"chars": 173,
"preview": "# docs: https://rust-lang.github.io/rustfmt/\n\n# Unstable options - to run these, use `cargo +nightly fmt`\nwrap_comments "
},
{
"path": "swiftide/Cargo.toml",
"chars": 4706,
"preview": "cargo-features = [\"edition2024\"]\n\n[package]\nname = \"swiftide\"\nversion.workspace = true\nedition.workspace = true\nlicense."
},
{
"path": "swiftide/build.rs",
"chars": 768,
"preview": "use std::{fs, path::Path};\n\nfn main() {\n let readme_path = Path::new(\"README.md\");\n let out_dir = std::env::var(\"O"
},
{
"path": "swiftide/src/lib.rs",
"chars": 6354,
"preview": "// show feature flags in the generated documentation\n// https://doc.rust-lang.org/rustdoc/unstable-features.html#extensi"
},
{
"path": "swiftide/src/test_utils.rs",
"chars": 1,
"preview": "\n"
},
{
"path": "swiftide/tests/dyn_traits.rs",
"chars": 2263,
"preview": "//! Tests for dyn trait objects\n#![cfg(all(\n feature = \"openai\",\n feature = \"qdrant\",\n feature = \"redis\",\n f"
},
{
"path": "swiftide/tests/indexing_pipeline.rs",
"chars": 9200,
"preview": "//! This module contains tests for the indexing pipeline in the Swiftide project.\n//! The tests validate the functionali"
},
{
"path": "swiftide/tests/lancedb.rs",
"chars": 8782,
"preview": "#![cfg(all(\n feature = \"openai\",\n feature = \"lancedb\",\n feature = \"fastembed\",\n feature = \"tree-sitter\"\n))]\n"
},
{
"path": "swiftide/tests/pgvector.rs",
"chars": 15954,
"preview": "//! This module contains tests for the `PgVector` indexing pipeline in the Swiftide project.\n//! The tests validate the "
},
{
"path": "swiftide/tests/query_pipeline.rs",
"chars": 4793,
"preview": "#![cfg(all(\n feature = \"openai\",\n feature = \"qdrant\",\n feature = \"fastembed\",\n feature = \"tree-sitter\"\n))]\n\n"
},
{
"path": "swiftide/tests/sparse_embeddings_and_hybrid_search.rs",
"chars": 6766,
"preview": "//! This module contains tests for the indexing pipeline in the Swiftide project.\n//! The tests validate the functionali"
},
{
"path": "swiftide-agents/Cargo.toml",
"chars": 1739,
"preview": "cargo-features = [\"edition2024\"]\n\n[package]\nname = \"swiftide-agents\"\nversion.workspace = true\nedition.workspace = true\nl"
},
{
"path": "swiftide-agents/src/agent.rs",
"chars": 60248,
"preview": "#![allow(dead_code)]\nuse crate::{\n default_context::DefaultContext,\n errors::AgentError,\n hooks::{\n Afte"
},
{
"path": "swiftide-agents/src/default_context.rs",
"chars": 21064,
"preview": "//! Manages agent history and provides an interface for the external world\n//!\n//! This is the default for agents. It is"
},
{
"path": "swiftide-agents/src/errors.rs",
"chars": 1207,
"preview": "use swiftide_core::chat_completion::{\n ChatCompletionRequestBuilderError,\n errors::{LanguageModelError, ToolError}"
},
{
"path": "swiftide-agents/src/hooks.rs",
"chars": 8473,
"preview": "//! Hooks are functions that are called at specific points in the agent lifecycle.\n//!\n//!\n//! Since rust does not have "
},
{
"path": "swiftide-agents/src/lib.rs",
"chars": 2500,
"preview": "// show feature flags in the generated documentation\n// https://doc.rust-lang.org/rustdoc/unstable-features.html#extensi"
},
{
"path": "swiftide-agents/src/snapshots/swiftide_agents__system_prompt__tests__customization.snap",
"chars": 947,
"preview": "---\nsource: swiftide-agents/src/system_prompt.rs\nexpression: rendered\n---\n# Your role\n\nspecial role\n# Guidelines you nee"
},
{
"path": "swiftide-agents/src/snapshots/swiftide_agents__system_prompt__tests__to_prompt.snap",
"chars": 947,
"preview": "---\nsource: swiftide-agents/src/system_prompt.rs\nexpression: rendered\n---\n# Your role\n\nspecial role\n# Guidelines you nee"
},
{
"path": "swiftide-agents/src/state.rs",
"chars": 2737,
"preview": "//! Internal state of the agent\n\nuse serde::{Deserialize, Serialize};\nuse serde_json::Value;\nuse swiftide_core::chat_com"
},
{
"path": "swiftide-agents/src/system_prompt.rs",
"chars": 10732,
"preview": "//! The system prompt is the initial role and constraint defining message the LLM will receive for\n//! completion.\n//!\n/"
},
{
"path": "swiftide-agents/src/system_prompt_template.md",
"chars": 1191,
"preview": "{% if role -%}\n\n# Your role\n\n{{role}}\n{% endif -%}\n\n# Guidelines you need to follow\n\n{# Guidelines provide soft rules an"
},
{
"path": "swiftide-agents/src/tasks/closures.rs",
"chars": 2851,
"preview": "use std::pin::Pin;\n\nuse async_trait::async_trait;\n\nuse super::{\n errors::NodeError,\n node::{NodeArg, NodeId, TaskN"
},
{
"path": "swiftide-agents/src/tasks/errors.rs",
"chars": 2227,
"preview": "use std::{any::Any, sync::Arc};\n\nuse super::transition::TransitionPayload;\n\n#[derive(thiserror::Error, Debug)]\npub enum "
},
{
"path": "swiftide-agents/src/tasks/impls.rs",
"chars": 4500,
"preview": "use std::sync::Arc;\n\nuse async_trait::async_trait;\nuse swiftide_core::{\n ChatCompletion, Command, CommandError, Comma"
},
{
"path": "swiftide-agents/src/tasks/mod.rs",
"chars": 97,
"preview": "pub mod closures;\npub mod errors;\npub mod impls;\npub mod node;\npub mod task;\npub mod transition;\n"
},
{
"path": "swiftide-agents/src/tasks/node.rs",
"chars": 4155,
"preview": "use std::any::Any;\n\nuse async_trait::async_trait;\nuse dyn_clone::DynClone;\n\nuse super::{\n errors::NodeError,\n tran"
},
{
"path": "swiftide-agents/src/tasks/task.rs",
"chars": 15628,
"preview": "//! Tasks enable you to to define a graph of interacting nodes\n//!\n//! The nodes can be any type that implements the `Ta"
},
{
"path": "swiftide-agents/src/tasks/transition.rs",
"chars": 4773,
"preview": "use std::{any::Any, pin::Pin, sync::Arc};\n\nuse async_trait::async_trait;\nuse dyn_clone::DynClone;\n\nuse super::{\n erro"
},
{
"path": "swiftide-agents/src/test_utils.rs",
"chars": 11213,
"preview": "use std::borrow::Cow;\nuse std::sync::{Arc, Mutex};\n\nuse async_trait::async_trait;\nuse swiftide_core::chat_completion::To"
},
{
"path": "swiftide-agents/src/tools/arg_preprocessor.rs",
"chars": 2791,
"preview": "use std::borrow::Cow;\n\nuse serde_json::{Map, Value};\nuse swiftide_core::chat_completion::ToolCall;\n\n/// Preprocesses arg"
},
{
"path": "swiftide-agents/src/tools/control.rs",
"chars": 11524,
"preview": "//! Control tools manage control flow during agent's lifecycle.\nuse anyhow::Result;\nuse async_trait::async_trait;\nuse sc"
},
{
"path": "swiftide-agents/src/tools/local_executor.rs",
"chars": 27476,
"preview": "//! Local executor for running tools on the local machine.\n//!\n//! By default will use the current directory as the work"
},
{
"path": "swiftide-agents/src/tools/mcp.rs",
"chars": 18667,
"preview": "//! Add tools provided by an MCP server to an agent\n//!\n//! Uses the `rmcp` crate to connect to an MCP server and list a"
},
{
"path": "swiftide-agents/src/tools/mod.rs",
"chars": 200,
"preview": "//! Default tools and executor for agents\npub mod arg_preprocessor;\npub mod control;\npub mod local_executor;\n\n/// Add to"
},
{
"path": "swiftide-agents/src/util.rs",
"chars": 2230,
"preview": "//! Internal utility functions and macros for anything agent\n\n/// Simple macro to consistently call hooks and clean up t"
},
{
"path": "swiftide-core/Cargo.toml",
"chars": 2055,
"preview": "cargo-features = [\"edition2024\"]\n\n[package]\nname = \"swiftide-core\"\nversion.workspace = true\nedition.workspace = true\nlic"
},
{
"path": "swiftide-core/README.md",
"chars": 108,
"preview": "# Swiftide-core\n\nCore crate includes low level types and traits for swiftide that are used by other crates.\n"
},
{
"path": "swiftide-core/src/agent_traits.rs",
"chars": 22272,
"preview": "use std::{\n borrow::Cow,\n path::{Path, PathBuf},\n sync::{Arc, Mutex},\n time::Duration,\n};\n\nuse crate::{\n "
},
{
"path": "swiftide-core/src/chat_completion/chat_completion_request.rs",
"chars": 5536,
"preview": "use std::{borrow::Cow, collections::BTreeSet};\n\nuse derive_builder::Builder;\n\nuse super::{chat_message::ChatMessage, too"
},
{
"path": "swiftide-core/src/chat_completion/chat_completion_response.rs",
"chars": 19240,
"preview": "use std::collections::HashMap;\n\nuse derive_builder::Builder;\nuse serde::{Deserialize, Serialize};\nuse uuid::Uuid;\n\nuse s"
},
{
"path": "swiftide-core/src/chat_completion/chat_message.rs",
"chars": 12207,
"preview": "use std::borrow::Cow;\n\nuse serde::{Deserialize, Serialize};\n\nuse super::tools::{ToolCall, ToolOutput};\n\n/// Reasoning it"
},
{
"path": "swiftide-core/src/chat_completion/errors.rs",
"chars": 2781,
"preview": "use std::borrow::Cow;\n\nuse thiserror::Error;\n\nuse crate::CommandError;\n\nuse super::ChatCompletionStream;\n\n/// A `ToolErr"
},
{
"path": "swiftide-core/src/chat_completion/mod.rs",
"chars": 799,
"preview": "//! This module enables the implementation of chat completion on LLM providers\n//!\n//! The main trait to implement is `C"
},
{
"path": "swiftide-core/src/chat_completion/tool_schema.rs",
"chars": 20538,
"preview": "use schemars::Schema;\nuse serde_json::{Map, Value, json};\nuse thiserror::Error;\n\n#[derive(Clone, Debug, PartialEq)]\npub "
},
{
"path": "swiftide-core/src/chat_completion/tools.rs",
"chars": 19969,
"preview": "use std::cmp::Ordering;\n\nuse derive_builder::Builder;\nuse schemars::Schema;\nuse serde::{Deserialize, Serialize};\nuse ser"
},
{
"path": "swiftide-core/src/chat_completion/traits.rs",
"chars": 5881,
"preview": "use anyhow::Result;\nuse async_trait::async_trait;\nuse dyn_clone::DynClone;\nuse futures_util::Stream;\nuse std::{borrow::C"
},
{
"path": "swiftide-core/src/document.rs",
"chars": 4714,
"preview": "//! Documents are the main data structure that is retrieved via the query pipeline\n//!\n//! Retrievers are expected to ea"
},
{
"path": "swiftide-core/src/indexing_decorators.rs",
"chars": 15273,
"preview": "use std::fmt::Debug;\n\nuse crate::chat_completion::{ChatCompletionRequest, ChatCompletionResponse};\nuse crate::stream_bac"
},
{
"path": "swiftide-core/src/indexing_defaults.rs",
"chars": 578,
"preview": "use std::sync::Arc;\n\nuse crate::SimplePrompt;\n\n#[derive(Debug, Default, Clone)]\npub struct IndexingDefaults(Arc<Indexing"
},
{
"path": "swiftide-core/src/indexing_stream.rs",
"chars": 3130,
"preview": "#![allow(clippy::from_over_into)]\n\n//! This module defines the `IndexingStream` type, which is used internally by a pipe"
},
{
"path": "swiftide-core/src/indexing_traits.rs",
"chars": 24681,
"preview": "//! Traits in Swiftide allow for easy extendability\n//!\n//! All steps defined in the indexing pipeline and the generic t"
},
{
"path": "swiftide-core/src/lib.rs",
"chars": 1870,
"preview": "// show feature flags in the generated documentation\n// https://doc.rust-lang.org/rustdoc/unstable-features.html#extensi"
},
{
"path": "swiftide-core/src/metadata.rs",
"chars": 6254,
"preview": "//! Metadata is a key-value store for indexation nodes\n//!\n//! Typically metadata is used to extract or generate additio"
},
{
"path": "swiftide-core/src/metrics.rs",
"chars": 1309,
"preview": "use std::sync::OnceLock;\n\nuse metrics::{IntoLabels, Label, counter, describe_counter};\n\nstatic METRICS_INIT: OnceLock<bo"
},
{
"path": "swiftide-core/src/node.rs",
"chars": 12972,
"preview": "//! This module defines the `Node` struct and its associated methods.\n//!\n//! `Node` represents a unit of data in the in"
},
{
"path": "swiftide-core/src/prelude.rs",
"chars": 288,
"preview": "pub use anyhow::{Context as _, Result};\npub use async_trait::async_trait;\npub use derive_builder::Builder;\npub use futur"
},
{
"path": "swiftide-core/src/prompt.rs",
"chars": 7171,
"preview": "//! Prompts templating and management\n//!\n//! Prompts are first class citizens in Swiftide and use [tera] under the hood"
},
{
"path": "swiftide-core/src/query.rs",
"chars": 11594,
"preview": "//! A query is the main object going through a query pipeline\n//!\n//! It acts as a statemachine, with the following tran"
},
{
"path": "swiftide-core/src/query_evaluation.rs",
"chars": 3168,
"preview": "use crate::querying::{Query, states};\n\n/// Wraps a query for evaluation. Used by the [`crate::query_traits::EvaluateQuer"
},
{
"path": "swiftide-core/src/query_stream.rs",
"chars": 1621,
"preview": "//! Internally used by a query pipeline\n//!\n//! Has a sender and receiver to initialize the stream\nuse anyhow::Result;\nu"
},
{
"path": "swiftide-core/src/query_traits.rs",
"chars": 7933,
"preview": "use std::sync::Arc;\n\nuse anyhow::Result;\nuse async_trait::async_trait;\nuse dyn_clone::DynClone;\n\nuse crate::{\n query:"
},
{
"path": "swiftide-core/src/search_strategies/custom_strategy.rs",
"chars": 3035,
"preview": "//! Implements a flexible vector search strategy framework using closure-based configuration.\n//! Supports both synchron"
},
{
"path": "swiftide-core/src/search_strategies/hybrid_search.rs",
"chars": 3683,
"preview": "use derive_builder::Builder;\n\nuse crate::{indexing::EmbeddedField, querying};\n\nuse super::{DEFAULT_TOP_K, DEFAULT_TOP_N,"
},
{
"path": "swiftide-core/src/search_strategies/mod.rs",
"chars": 708,
"preview": "//! Search strategies provide a generic way for Retrievers to implement their\n//! search in various ways.\n//!\n//! The st"
},
{
"path": "swiftide-core/src/search_strategies/similarity_single_embedding.rs",
"chars": 1923,
"preview": "use crate::querying;\n\nuse super::{DEFAULT_TOP_K, SearchFilter};\n\n/// A simple, single vector similarity search where it "
},
{
"path": "swiftide-core/src/statistics.rs",
"chars": 11940,
"preview": "//! Pipeline statistics collection\n//!\n//! This module provides comprehensive monitoring and observability for pipelines"
},
{
"path": "swiftide-core/src/stream_backoff.rs",
"chars": 7377,
"preview": "// Credits go to https://github.com/ihrwein/backoff/pull/50\nuse std::{pin::Pin, task::Poll, time::Duration};\n\nuse backof"
},
{
"path": "swiftide-core/src/test_utils.rs",
"chars": 7307,
"preview": "#![allow(clippy::missing_panics_doc)]\nuse std::fmt::Write as _;\nuse std::sync::{Arc, Mutex};\n\nuse async_trait::async_tra"
},
{
"path": "swiftide-core/src/token_estimation.rs",
"chars": 8492,
"preview": "use std::borrow::Cow;\n\nuse anyhow::Result;\nuse async_trait::async_trait;\n\nuse crate::{chat_completion::ChatMessage, prom"
},
{
"path": "swiftide-core/src/type_aliases.rs",
"chars": 630,
"preview": "#![cfg_attr(coverage_nightly, coverage(off))]\n\nuse serde::{Deserialize, Serialize};\n\npub type Embedding = Vec<f32>;\npub "
},
{
"path": "swiftide-core/src/util.rs",
"chars": 1361,
"preview": "//! Utility functions for Swiftide\n\n/// Safely truncates a string to a maximum number of characters.\n///\n/// Respects ut"
},
{
"path": "swiftide-indexing/Cargo.toml",
"chars": 1651,
"preview": "cargo-features = [\"edition2024\"]\n\n[package]\nname = \"swiftide-indexing\"\nversion.workspace = true\nedition.workspace = true"
},
{
"path": "swiftide-indexing/src/lib.rs",
"chars": 411,
"preview": "// show feature flags in the generated documentation\n// https://doc.rust-lang.org/rustdoc/unstable-features.html#extensi"
},
{
"path": "swiftide-indexing/src/loaders/file_loader.rs",
"chars": 6922,
"preview": "//! Load files from a directory\nuse std::{\n io::Read as _,\n path::{Path, PathBuf},\n};\n\nuse anyhow::Context as _;\nu"
},
{
"path": "swiftide-indexing/src/loaders/mod.rs",
"chars": 467,
"preview": "//! The `loaders` module provides functionality for loading files from a specified directory.\n//! It includes the `FileL"
},
{
"path": "swiftide-indexing/src/persist/memory_storage.rs",
"chars": 3843,
"preview": "use std::{\n collections::HashMap,\n sync::{\n Arc,\n atomic::{AtomicUsize, Ordering},\n },\n};\n\nuse an"
},
{
"path": "swiftide-indexing/src/persist/mod.rs",
"chars": 175,
"preview": "//! Storage implementations for persisting data\n//!\n//! More storage implementations are available as integrations.\nmod "
},
{
"path": "swiftide-indexing/src/pipeline.rs",
"chars": 38753,
"preview": "use anyhow::Result;\nuse futures_util::{StreamExt, TryFutureExt, TryStreamExt};\nuse swiftide_core::{\n BatchableTransfo"
},
{
"path": "swiftide-indexing/src/transformers/chunk_markdown.rs",
"chars": 6872,
"preview": "//! Chunk markdown content into smaller pieces\nuse std::sync::Arc;\n\nuse async_trait::async_trait;\nuse derive_builder::Bu"
},
{
"path": "swiftide-indexing/src/transformers/chunk_text.rs",
"chars": 6366,
"preview": "//! Chunk text content into smaller pieces\nuse std::sync::Arc;\n\nuse async_trait::async_trait;\nuse derive_builder::Builde"
},
{
"path": "swiftide-indexing/src/transformers/embed.rs",
"chars": 12336,
"preview": "//! Generic embedding transformer\nuse std::{collections::VecDeque, sync::Arc};\n\nuse anyhow::bail;\nuse async_trait::async"
},
{
"path": "swiftide-indexing/src/transformers/metadata_keywords.rs",
"chars": 2761,
"preview": "//! Extract keywords from a node and add them as metadata\n//! This module defines the `MetadataKeywords` struct and its "
},
{
"path": "swiftide-indexing/src/transformers/metadata_qa_text.rs",
"chars": 3107,
"preview": "//! Generates questions and answers from a given text chunk and adds them as metadata.\n//! This module defines the `Meta"
},
{
"path": "swiftide-indexing/src/transformers/metadata_summary.rs",
"chars": 2673,
"preview": "//! Generate a summary and adds it as metadata\n//! This module defines the `MetadataSummary` struct and its associated m"
},
{
"path": "swiftide-indexing/src/transformers/metadata_title.rs",
"chars": 2698,
"preview": "//! Generate a title and adds it as metadata\n//! This module defines the `MetadataTitle` struct and its associated metho"
},
{
"path": "swiftide-indexing/src/transformers/mod.rs",
"chars": 966,
"preview": "//! Various transformers for chunking, embedding and transforming data\n//!\n//! These transformers are generic over their"
},
{
"path": "swiftide-indexing/src/transformers/prompts/metadata_keywords.prompt.md",
"chars": 468,
"preview": "# Task\n\nYour task is to generate a descriptive, concise keywords for the given text\n\n# Constraints\n\n- Only respond in th"
},
{
"path": "swiftide-indexing/src/transformers/prompts/metadata_qa_text.prompt.md",
"chars": 699,
"preview": "# Task\n\nYour task is to generate questions and answers for the given text.\n\nGiven that somebody else might ask questions"
},
{
"path": "swiftide-indexing/src/transformers/prompts/metadata_summary.prompt.md",
"chars": 401,
"preview": "# Task\n\nYour task is to generate a descriptive, concise summary for the given text\n\n# Constraints\n\n- Only respond in the"
},
{
"path": "swiftide-indexing/src/transformers/prompts/metadata_title.prompt.md",
"chars": 339,
"preview": "# Task\n\nYour task is to generate a descriptive, concise title for the given text\n\n# Constraints\n\n- Only respond in the e"
},
{
"path": "swiftide-indexing/src/transformers/snapshots/swiftide_indexing__transformers__compress_code_outline__test__compress_code_template.snap",
"chars": 887,
"preview": "---\nsource: swiftide-indexing/src/transformers/compress_code_outline.rs\nexpression: prompt.render().await.unwrap()\n---\n#"
},
{
"path": "swiftide-indexing/src/transformers/snapshots/swiftide_indexing__transformers__metadata_keywords__test__template.snap",
"chars": 571,
"preview": "---\nsource: swiftide-indexing/src/transformers/metadata_keywords.rs\nexpression: prompt.render().await.unwrap()\n---\n# Tas"
},
{
"path": "swiftide-indexing/src/transformers/snapshots/swiftide_indexing__transformers__metadata_qa_code__test__template.snap",
"chars": 894,
"preview": "---\nsource: swiftide-indexing/src/transformers/metadata_qa_code.rs\nexpression: prompt.render().await.unwrap()\n---\n# Task"
},
{
"path": "swiftide-indexing/src/transformers/snapshots/swiftide_indexing__transformers__metadata_qa_code__test__template_with_outline.snap",
"chars": 947,
"preview": "---\nsource: swiftide-indexing/src/transformers/metadata_qa_code.rs\nexpression: prompt.render().await.unwrap()\n---\n# Task"
},
{
"path": "swiftide-indexing/src/transformers/snapshots/swiftide_indexing__transformers__metadata_qa_text__test__template.snap",
"chars": 791,
"preview": "---\nsource: swiftide-indexing/src/transformers/metadata_qa_text.rs\nexpression: prompt.render().await.unwrap()\n---\n# Task"
},
{
"path": "swiftide-indexing/src/transformers/snapshots/swiftide_indexing__transformers__metadata_summary__test__template.snap",
"chars": 505,
"preview": "---\nsource: swiftide-indexing/src/transformers/metadata_summary.rs\nexpression: prompt.render().await.unwrap()\n---\n# Task"
},
{
"path": "swiftide-indexing/src/transformers/snapshots/swiftide_indexing__transformers__metadata_title__test__template.snap",
"chars": 441,
"preview": "---\nsource: swiftide-indexing/src/transformers/metadata_title.rs\nexpression: prompt.render().await.unwrap()\n---\n# Task\n\n"
},
{
"path": "swiftide-indexing/src/transformers/sparse_embed.rs",
"chars": 13269,
"preview": "//! Generic embedding transformer\nuse std::{collections::VecDeque, sync::Arc};\n\nuse anyhow::bail;\nuse async_trait::async"
},
{
"path": "swiftide-integrations/Cargo.toml",
"chars": 7776,
"preview": "cargo-features = [\"edition2024\"]\n\n[package]\nname = \"swiftide-integrations\"\nversion.workspace = true\nedition.workspace = "
},
{
"path": "swiftide-integrations/src/anthropic/chat_completion.rs",
"chars": 27879,
"preview": "use futures_util::{StreamExt as _, TryStreamExt as _, stream};\nuse std::sync::{Arc, Mutex};\n\nuse anyhow::{Context as _, "
},
{
"path": "swiftide-integrations/src/anthropic/mod.rs",
"chars": 3893,
"preview": "use std::{pin::Pin, sync::Arc};\n\nuse derive_builder::Builder;\nuse swiftide_core::chat_completion::Usage;\n\npub mod chat_c"
},
{
"path": "swiftide-integrations/src/anthropic/simple_prompt.rs",
"chars": 4444,
"preview": "use anyhow::Context as _;\nuse async_anthropic::{errors::AnthropicError, types::CreateMessagesRequestBuilder};\nuse async_"
},
{
"path": "swiftide-integrations/src/anthropic/tool_schema.rs",
"chars": 445,
"preview": "use serde_json::Value;\nuse swiftide_core::chat_completion::{ToolSpec, ToolSpecError};\n\npub(super) struct AnthropicToolSc"
},
{
"path": "swiftide-integrations/src/aws_bedrock_v2/chat_completion.rs",
"chars": 86113,
"preview": "use std::collections::HashMap;\n\nuse anyhow::Context as _;\nuse async_trait::async_trait;\nuse aws_sdk_bedrockruntime::{\n "
},
{
"path": "swiftide-integrations/src/aws_bedrock_v2/mod.rs",
"chars": 42702,
"preview": "use std::{pin::Pin, sync::Arc};\n\nuse async_trait::async_trait;\nuse aws_sdk_bedrockruntime::{\n Client,\n error::SdkE"
},
{
"path": "swiftide-integrations/src/aws_bedrock_v2/simple_prompt.rs",
"chars": 13497,
"preview": "use async_trait::async_trait;\nuse swiftide_core::{\n ChatCompletion,\n chat_completion::{ChatCompletionRequest, Chat"
},
{
"path": "swiftide-integrations/src/aws_bedrock_v2/structured_prompt.rs",
"chars": 21854,
"preview": "use async_trait::async_trait;\nuse aws_sdk_bedrockruntime::types::{\n ContentBlock, ConversationRole, JsonSchemaDefinit"
},
{
"path": "swiftide-integrations/src/aws_bedrock_v2/test_utils.rs",
"chars": 3997,
"preview": "use aws_credential_types::Credentials;\nuse aws_sdk_bedrockruntime::{Client, Config, config::Region};\nuse aws_smithy_type"
},
{
"path": "swiftide-integrations/src/aws_bedrock_v2/tool_schema.rs",
"chars": 448,
"preview": "use serde_json::Value;\nuse swiftide_core::chat_completion::{ToolSpec, ToolSpecError};\n\npub(super) struct AwsBedrockToolS"
},
{
"path": "swiftide-integrations/src/dashscope/config.rs",
"chars": 1346,
"preview": "use reqwest::header::{AUTHORIZATION, HeaderMap};\nuse secrecy::{ExposeSecret as _, SecretString};\nuse serde::Deserialize;"
},
{
"path": "swiftide-integrations/src/dashscope/mod.rs",
"chars": 1160,
"preview": "use config::DashscopeConfig;\n\nuse crate::openai;\n\nmod config;\n\npub type Dashscope = openai::GenericOpenAI<DashscopeConfi"
},
{
"path": "swiftide-integrations/src/duckdb/extensions.sql",
"chars": 26,
"preview": "INSTALL vss;\nINSTALL fts;\n"
},
{
"path": "swiftide-integrations/src/duckdb/hybrid_query.sql",
"chars": 1194,
"preview": "with fts as (\n select \n uuid, \n chunk, \n path,\n fts_main_{{table_name}}.match_bm25(\n "
},
{
"path": "swiftide-integrations/src/duckdb/mod.rs",
"chars": 9453,
"preview": "use std::{\n collections::HashMap,\n sync::{Arc, Mutex},\n};\n\nuse anyhow::{Context as _, Result};\nuse derive_builder:"
},
{
"path": "swiftide-integrations/src/duckdb/node_cache.rs",
"chars": 3901,
"preview": "use anyhow::Context as _;\nuse async_trait::async_trait;\nuse swiftide_core::{\n NodeCache,\n indexing::{Chunk, Node},"
},
{
"path": "swiftide-integrations/src/duckdb/persist.rs",
"chars": 14196,
"preview": "use std::{\n borrow::Cow,\n path::Path,\n sync::{LazyLock, Mutex as StdMutex},\n};\n\nuse anyhow::{Context as _, Resu"
},
{
"path": "swiftide-integrations/src/duckdb/retrieve.rs",
"chars": 8041,
"preview": "use anyhow::{Context as _, Result};\nuse async_trait::async_trait;\nuse swiftide_core::{\n Retrieve,\n indexing::Chunk"
},
{
"path": "swiftide-integrations/src/duckdb/schema.sql",
"chars": 215,
"preview": "LOAD vss;\nLOAD fts;\n\n\nCREATE TABLE IF NOT EXISTS {{table_name}} (\n uuid TEXT PRIMARY KEY,\n chunk TEXT NOT NULL,\n path"
},
{
"path": "swiftide-integrations/src/duckdb/upsert.sql",
"chars": 455,
"preview": "INSERT INTO {{ table_name }} (uuid, chunk, path, {{ vector_field_names | join(sep=\", \") }})\nVALUES (?, ?, ?,\n {% for _"
},
{
"path": "swiftide-integrations/src/fastembed/embedding_model.rs",
"chars": 811,
"preview": "use anyhow::Result;\nuse async_trait::async_trait;\nuse swiftide_core::{EmbeddingModel, Embeddings, chat_completion::error"
},
{
"path": "swiftide-integrations/src/fastembed/mod.rs",
"chars": 4283,
"preview": "//! `FastEmbed` integration for text embedding.\n\nuse std::sync::Arc;\n\nuse anyhow::Result;\nuse derive_builder::Builder;\nu"
},
{
"path": "swiftide-integrations/src/fastembed/rerank.rs",
"chars": 5941,
"preview": "use anyhow::{Context as _, Result};\nuse itertools::Itertools;\nuse std::sync::Arc;\n\nuse async_trait::async_trait;\nuse der"
},
{
"path": "swiftide-integrations/src/fastembed/sparse_embedding_model.rs",
"chars": 1609,
"preview": "use async_trait::async_trait;\nuse swiftide_core::chat_completion::errors::LanguageModelError;\nuse swiftide_core::{Sparse"
},
{
"path": "swiftide-integrations/src/fluvio/loader.rs",
"chars": 8609,
"preview": "use std::string::ToString;\n\nuse anyhow::Context as _;\nuse futures_util::{StreamExt as _, TryStreamExt as _};\nuse swiftid"
},
{
"path": "swiftide-integrations/src/fluvio/mod.rs",
"chars": 1683,
"preview": "//! Fluvio is a real-time streaming data transformation platform.\n//!\n//! This module provides a Fluvio loader for Swift"
},
{
"path": "swiftide-integrations/src/gemini/config.rs",
"chars": 1273,
"preview": "use reqwest::header::{AUTHORIZATION, HeaderMap};\nuse secrecy::{ExposeSecret as _, SecretString};\nuse serde::Deserialize;"
},
{
"path": "swiftide-integrations/src/gemini/mod.rs",
"chars": 1407,
"preview": "//! This module provides integration with `Gemini`'s API, enabling the use of language models within\n//! the Swiftide pr"
},
{
"path": "swiftide-integrations/src/groq/config.rs",
"chars": 1236,
"preview": "use reqwest::header::{AUTHORIZATION, HeaderMap};\nuse secrecy::{ExposeSecret as _, SecretString};\nuse serde::Deserialize;"
},
{
"path": "swiftide-integrations/src/groq/mod.rs",
"chars": 1361,
"preview": "//! This module provides integration with `Groq`'s API, enabling the use of language models within\n//! the Swiftide proj"
},
{
"path": "swiftide-integrations/src/kafka/loader.rs",
"chars": 5823,
"preview": "use futures_util::{StreamExt as _, stream};\nuse rdkafka::{\n Message,\n consumer::{Consumer, StreamConsumer},\n me"
},
{
"path": "swiftide-integrations/src/kafka/mod.rs",
"chars": 4270,
"preview": "//! Kafka is a distributed streaming platform.\n//!\n//! This module provides a Kafka loader for Swiftide and allows you t"
},
{
"path": "swiftide-integrations/src/kafka/persist.rs",
"chars": 4519,
"preview": "use std::{sync::Arc, time::Duration};\n\nuse anyhow::Result;\nuse async_trait::async_trait;\n\nuse rdkafka::producer::FutureR"
},
{
"path": "swiftide-integrations/src/lancedb/connection_pool.rs",
"chars": 1602,
"preview": "use anyhow::Context as _;\nuse anyhow::Result;\nuse deadpool::managed::Manager;\nuse derive_builder::Builder;\nuse lancedb::"
},
{
"path": "swiftide-integrations/src/lancedb/mod.rs",
"chars": 8441,
"preview": "use std::sync::Arc;\n\nuse anyhow::Context as _;\nuse anyhow::Result;\nuse connection_pool::LanceDBConnectionPool;\nuse conne"
},
{
"path": "swiftide-integrations/src/lancedb/persist.rs",
"chars": 6332,
"preview": "use std::sync::Arc;\n\nuse anyhow::Context as _;\nuse anyhow::Result;\nuse arrow_array::Array;\nuse arrow_array::FixedSizeLis"
},
{
"path": "swiftide-integrations/src/lancedb/retrieve.rs",
"chars": 8269,
"preview": "use anyhow::Result;\nuse arrow_array::{RecordBatch, StringArray};\nuse async_trait::async_trait;\nuse futures_util::TryStre"
}
]
// ... and 150 more files (download for full content)
About this extraction
This page contains the full source code of the bosun-ai/swiftide GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 350 files (1.9 MB), approximately 461.8k tokens, and a symbol index with 2779 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.