Skip to content

Commit 4ec46ae

Browse files
authored
Docs: Updating Microsoft Provider Documentation to Include Azure AI (#31467)
This PR adds documentation to our Microsft Provider page for LangChain Azure AI. This PR does not add any extra dependencies or require any tests besides passing CI.
1 parent 993e34f commit 4ec46ae

File tree

1 file changed

+58
-3
lines changed

1 file changed

+58
-3
lines changed

docs/docs/integrations/providers/microsoft.mdx

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,15 @@ keywords: [azure]
44

55
# Microsoft
66

7-
All functionality related to `Microsoft Azure` and other `Microsoft` products.
7+
All functionality related to [Microsoft Azure](https://portal.azure.com) and other [Microsoft](https://www.microsoft.com) products.
88

9-
## Chat Models
9+
## Chat Models
10+
11+
Microsoft offers three main options for accessing chat models through Azure:
12+
13+
1. [Azure OpenAI](https://learn.microsoft.com/en-us/azure/ai-services/openai/) - Provides access to OpenAI's powerful models like o3, 4.1, and other models through Microsoft Azure's secure enterprise platform.
14+
2. [Azure AI](https://learn.microsoft.com/en-us/azure/ai-studio/how-to/deploy-models) - Offers access to a variety of models from different providers including Anthropic, DeepSeek, Cohere, Phi and Mistral through a unified API.
15+
3. [Azure ML](https://learn.microsoft.com/en-us/azure/machine-learning/) - Allows deployment and management of your own custom models or fine-tuned open-source models with Azure Machine Learning.
1016

1117
### Azure OpenAI
1218

@@ -29,11 +35,36 @@ os.environ["AZURE_OPENAI_API_KEY"] = "your AzureOpenAI key"
2935

3036
See a [usage example](/docs/integrations/chat/azure_chat_openai)
3137

32-
3338
```python
3439
from langchain_openai import AzureChatOpenAI
3540
```
3641

42+
### Azure AI
43+
44+
>[Azure AI Foundry](https://learn.microsoft.com/en-us/azure/developer/python/get-started) provides access to a wide range of models from various providers including Azure OpenAI, DeepSeek R1, Cohere, Phi and Mistral through the `AzureAIChatCompletionsModel` class.
45+
46+
```bash
47+
pip install -U langchain-azure-ai
48+
```
49+
50+
Configure your API key and Endpoint.
51+
52+
```bash
53+
export AZURE_INFERENCE_CREDENTIAL=your-api-key
54+
export AZURE_INFERENCE_ENDPOINT=your-endpoint
55+
```
56+
57+
```python
58+
from langchain_azure_ai.chat_models import AzureAIChatCompletionsModel
59+
60+
llm = AzureAIChatCompletionsModel(
61+
model_name="gpt-4o",
62+
api_version="2024-05-01-preview",
63+
)
64+
```
65+
66+
See a [usage example](/docs/integrations/chat/azure_ai)
67+
3768
### Azure ML Chat Online Endpoint
3869

3970
See the documentation [here](/docs/integrations/chat/azureml_chat_endpoint) for accessing chat
@@ -59,6 +90,9 @@ from langchain_openai import AzureOpenAI
5990
```
6091

6192
## Embedding Models
93+
94+
Microsoft offers two main options for accessing embedding models through Azure:
95+
6296
### Azure OpenAI
6397

6498
See a [usage example](/docs/integrations/text_embedding/azureopenai)
@@ -67,6 +101,27 @@ See a [usage example](/docs/integrations/text_embedding/azureopenai)
67101
from langchain_openai import AzureOpenAIEmbeddings
68102
```
69103

104+
### Azure AI
105+
106+
```bash
107+
pip install -U langchain-azure-ai
108+
```
109+
110+
Configure your API key and Endpoint.
111+
112+
```bash
113+
export AZURE_INFERENCE_CREDENTIAL=your-api-key
114+
export AZURE_INFERENCE_ENDPOINT=your-endpoint
115+
```
116+
117+
```python
118+
from langchain_azure_ai.embeddings import AzureAIEmbeddingsModel
119+
120+
embed_model = AzureAIEmbeddingsModel(
121+
model_name="text-embedding-ada-002"
122+
)
123+
```
124+
70125
## Document loaders
71126

72127
### Azure AI Data

0 commit comments

Comments
 (0)