Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 39 additions & 8 deletions src/oss/python/integrations/providers/microsoft.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,37 @@ See a [usage example](/oss/integrations/document_loaders/url/#playwright-url-loa
from langchain_community.document_loaders.onenote import OneNoteLoader
```

## Memory

### Azure Cosmos DB Chat Message History

>[Azure Cosmos DB](https://learn.microsoft.com/azure/cosmos-db/) provides chat message history storage for conversational AI applications, enabling you to persist and retrieve conversation history with low latency and high availability.

<CodeGroup>
```bash pip
pip install langchain-azure-ai
```

```bash uv
uv add langchain-azure-ai
```
</CodeGroup>

Configure your Azure Cosmos DB connection:

```python
from langchain_azure_ai.chat_message_histories import CosmosDBChatMessageHistory

history = CosmosDBChatMessageHistory(
cosmos_endpoint="https://<your-account>.documents.azure.com:443/",
cosmos_database="<your-database>",
cosmos_container="<your-container>",
session_id="<session-id>",
user_id="<user-id>",
credential="<your-credential>" # or use connection_string
)
```

Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Memory section lacks a usage example link or reference documentation link. Following the pattern established in other sections of this file (e.g., vector stores at lines 436 and 474), consider adding a 'See a usage example' link if such documentation exists, or a link to the Azure Cosmos DB chat message history documentation.

Suggested change
See the [Azure Cosmos DB chat message history documentation](https://learn.microsoft.com/en-us/azure/cosmos-db/ai-agents#chat-message-history) for more details and usage examples.

Copilot uses AI. Check for mistakes.
## Vector Stores

### Azure Cosmos DB
Expand All @@ -382,15 +413,15 @@ Below are two available Azure Cosmos DB APIs that can provide vector store funct

See [detailed configuration instructions](/oss/integrations/vectorstores/azure_cosmos_db_mongo_vcore).

We need to install `pymongo` python package.
We need to install `langchain-azure-ai` and `pymongo` python packages.

<CodeGroup>
```bash pip
pip install pymongo
pip install langchain-azure-ai pymongo
```

```bash uv
uv add pymongo
uv add langchain-azure-ai pymongo
```
</CodeGroup>

Expand All @@ -405,7 +436,7 @@ With Cosmos DB for MongoDB vCore, developers can enjoy the benefits of native Az
See a [usage example](/oss/integrations/vectorstores/azure_cosmos_db_mongo_vcore).

```python
from langchain_community.vectorstores import AzureCosmosDBVectorSearch
from langchain_azure_ai.vectorstores import AzureCosmosDBMongoVCoreVectorSearch
```

#### Azure Cosmos DB NoSQL
Expand All @@ -421,15 +452,15 @@ efficiency of vector-based operations.

See [detail configuration instructions](/oss/integrations/vectorstores/azure_cosmos_db_no_sql).

We need to install `azure-cosmos` python package.
We need to install `langchain-azure-ai` and `azure-cosmos` python packages.

<CodeGroup>
```bash pip
pip install azure-cosmos
pip install langchain-azure-ai azure-cosmos
```

```bash uv
uv add azure-cosmos
uv add langchain-azure-ai azure-cosmos
```
</CodeGroup>

Expand All @@ -443,7 +474,7 @@ in every Azure region and can automatically replicate data closer to users. It h
See a [usage example](/oss/integrations/vectorstores/azure_cosmos_db_no_sql).

```python
from langchain_community.vectorstores import AzureCosmosDBNoSQLVectorSearch
from langchain_azure_ai.vectorstores import AzureCosmosDBNoSqlVectorSearch
```

### Azure Database for PostgreSQL
Expand Down