AzureCosmosDBVectorSearch(
self,
collection: Collection,
embedding: Embeddings,
*,
index_name: str| Name | Type | Description |
|---|---|---|
collection* | Collection | MongoDB collection to add the texts to. |
embedding* | Embeddings | Text embedding model to use. |
index_name | str | Default: 'vectorSearchIndex'Name of the Atlas Search index. |
text_key | str | Default: 'textContent' |
embedding_key | str | Default: 'vectorContent' |
| Name | Type |
|---|---|
| collection | Collection |
| embedding | Embeddings |
| index_name | str |
| text_key | str |
| embedding_key | str |
| application_name | str |
Azure Cosmos DB for MongoDB vCore vector store.
To use, you should have both:
pymongo python package installedExample:
. code-block:: python
from langchain_community.vectorstores import AzureCosmosDBVectorSearch from langchain_community.embeddings.openai import OpenAIEmbeddings from pymongo import MongoClient
mongo_client = MongoClient("
MongoDB field that will contain the text for each document.
MongoDB field that will contain the embedding for each document.