AzureCosmosDBNoSqlSemanticCache(
self,
embedding: Embeddings,
cosmos_client: CosmosClient,
database_name: str = | Name | Type | Description |
|---|---|---|
embedding* | Embeddings | CosmosDB Embedding. |
cosmos_client* | CosmosClient | CosmosDB client |
database_name | str | Default: 'CosmosNoSqlCacheDB'CosmosDB database name |
container_name | str | Default: 'CosmosNoSqlCacheContainer' |
vector_embedding_policy* | Dict[str, Any] | |
indexing_policy* | Dict[str, Any] | |
cosmos_container_properties* | Dict[str, Any] | |
cosmos_database_properties* | Dict[str, Any] | |
vector_search_fields* | Dict[str, Any] | |
search_type | str | Default: 'vector' |
create_container | bool | Default: True |
score_threshold | float | Default: 0.5 |
| Name | Type |
|---|---|
| embedding | Embeddings |
| cosmos_client | CosmosClient |
| database_name | str |
| container_name | str |
| vector_embedding_policy | Dict[str, Any] |
| indexing_policy | Dict[str, Any] |
| cosmos_container_properties | Dict[str, Any] |
| cosmos_database_properties | Dict[str, Any] |
| vector_search_fields | Dict[str, Any] |
| search_type | str |
| create_container | bool |
| score_threshold | float |
Cache that uses Cosmos DB NoSQL backend.
CosmosDB container name
CosmosDB vector embedding policy
CosmosDB indexing policy
CosmosDB container properties
CosmosDB database properties
Vector Search Fields for the container.
CosmosDB search type.
Create the container if it doesn't exist.
Threshold for a cache hit. For cosine and dot product, this is the minimum similarity score — results below it are treated as cache misses. For Euclidean, this is the maximum distance — results above it are misses.