Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
OurBuilding Ambient Agents with LangGraph course is now available on LangChain Academy!
Open on GitHub

Azure AI

All functionality related toAzure AI Foundry and its related projects.

Integration packages for Azure AI, Dynamic Sessions, SQL Server are maintained inthelangchain-azure repository.

Chat models

We recommend developers start with the (langchain-azure-ai) to access all the models available inAzure AI Foundry.

Azure AI Chat Completions Model

Access models like Azure OpenAI, DeepSeek R1, Cohere, Phi and Mistral using theAzureAIChatCompletionsModel class.

pip install -U langchain-azure-ai

Configure your API key and Endpoint.

export AZURE_INFERENCE_CREDENTIAL=your-api-key
export AZURE_INFERENCE_ENDPOINT=your-endpoint
from langchain_azure_ai.chat_modelsimport AzureAIChatCompletionsModel

llm= AzureAIChatCompletionsModel(
model_name="gpt-4o",
api_version="2024-05-01-preview",
)

llm.invoke('Tell me a joke and include some emojis')

Embedding models

Azure AI model inference for embeddings

pip install -U langchain-azure-ai

Configure your API key and Endpoint.

export AZURE_INFERENCE_CREDENTIAL=your-api-key
export AZURE_INFERENCE_ENDPOINT=your-endpoint
from langchain_azure_ai.embeddingsimport AzureAIEmbeddingsModel

embed_model= AzureAIEmbeddingsModel(
model_name="text-embedding-ada-002"
)

[8]ページ先頭

©2009-2025 Movatter.jp