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

@ -239,3 +239,30 @@ See [MongoDB Atlas Vector Search documentation](https://www.mongodb.com/docs/atl
For general MongoDB documentation, visit [MongoDB Documentation](https://docs.mongodb.com/).
## Configuration
| Field | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|
| `connection_string` | `<class 'str'>` | No | | MongoDB Atlas connection string (e.g., mongodb+srv://user:pass@cluster.mongodb.net/) |
| `database_name` | `<class 'str'>` | No | llama_stack | Database name to use for vector collections |
| `index_name` | `<class 'str'>` | No | vector_index | Name of the vector search index |
| `path_field` | `<class 'str'>` | No | embedding | Field name for storing embeddings |
| `similarity_metric` | `<class 'str'>` | No | cosine | Similarity metric: cosine, euclidean, or dotProduct |
| `max_pool_size` | `<class 'int'>` | No | 100 | Maximum connection pool size |
| `timeout_ms` | `<class 'int'>` | No | 30000 | Connection timeout in milliseconds |
| `persistence` | `llama_stack.core.storage.datatypes.KVStoreReference \| None` | No | | Config for KV store backend for metadata storage |
## Sample Configuration
```yaml
connection_string: ${env.MONGODB_CONNECTION_STRING:=}
database_name: ${env.MONGODB_DATABASE_NAME:=llama_stack}
index_name: ${env.MONGODB_INDEX_NAME:=vector_index}
path_field: ${env.MONGODB_PATH_FIELD:=embedding}
similarity_metric: ${env.MONGODB_SIMILARITY_METRIC:=cosine}
max_pool_size: ${env.MONGODB_MAX_POOL_SIZE:=100}
timeout_ms: ${env.MONGODB_TIMEOUT_MS:=30000}
persistence:
namespace: vector_io::mongodb_atlas
backend: kv_default
```