fix: apply pre-commit hook auto-fixes and resolve mypy errors

- Fixed mypy type error in MongoDB aggregate pipeline
- Auto-formatted code with ruff
- Generated provider documentation
- Applied formatting to YAML files
This commit is contained in:
Young Han 2025-10-28 16:34:05 -07:00
parent efe9c04849
commit 9d7320769b
3 changed files with 35 additions and 24 deletions

View file

@ -86,8 +86,7 @@ def get_remote_inference_providers() -> list[Provider]:
remote_providers = [
provider
for provider in available_providers()
if isinstance(provider, RemoteProviderSpec)
and provider.adapter_type in ENABLED_INFERENCE_PROVIDERS
if isinstance(provider, RemoteProviderSpec) and provider.adapter_type in ENABLED_INFERENCE_PROVIDERS
]
inference_providers = []
@ -114,10 +113,7 @@ def get_distribution_template(name: str = "starter") -> DistributionTemplate:
remote_inference_providers = get_remote_inference_providers()
providers = {
"inference": [
BuildProvider(provider_type=p.provider_type, module=p.module)
for p in remote_inference_providers
]
"inference": [BuildProvider(provider_type=p.provider_type, module=p.module) for p in remote_inference_providers]
+ [BuildProvider(provider_type="inline::sentence-transformers")],
"vector_io": [
BuildProvider(provider_type="inline::faiss"),
@ -159,9 +155,7 @@ def get_distribution_template(name: str = "starter") -> DistributionTemplate:
files_provider = Provider(
provider_id="meta-reference-files",
provider_type="inline::localfs",
config=LocalfsFilesImplConfig.sample_run_config(
f"~/.llama/distributions/{name}"
),
config=LocalfsFilesImplConfig.sample_run_config(f"~/.llama/distributions/{name}"),
)
embedding_provider = Provider(
provider_id="sentence-transformers",
@ -208,23 +202,17 @@ def get_distribution_template(name: str = "starter") -> DistributionTemplate:
Provider(
provider_id="faiss",
provider_type="inline::faiss",
config=FaissVectorIOConfig.sample_run_config(
f"~/.llama/distributions/{name}"
),
config=FaissVectorIOConfig.sample_run_config(f"~/.llama/distributions/{name}"),
),
Provider(
provider_id="sqlite-vec",
provider_type="inline::sqlite-vec",
config=SQLiteVectorIOConfig.sample_run_config(
f"~/.llama/distributions/{name}"
),
config=SQLiteVectorIOConfig.sample_run_config(f"~/.llama/distributions/{name}"),
),
Provider(
provider_id="${env.MILVUS_URL:+milvus}",
provider_type="inline::milvus",
config=MilvusVectorIOConfig.sample_run_config(
f"~/.llama/distributions/{name}"
),
config=MilvusVectorIOConfig.sample_run_config(f"~/.llama/distributions/{name}"),
),
Provider(
provider_id="${env.CHROMADB_URL:+chromadb}",