Skip to main content

Chat model integrations

还没翻译译自英文(docs.langchain.com)本页 43 段都还没译

Chat models are language models that use a sequence of messages as inputs and return messages as outputs (as opposed to plaintext).

Install and use

OpenAI

Anthropic

Google Gemini

MistralAI

Groq

Info

While these LangChain classes support the indicated advanced feature, you may need to refer to provider-specific documentation to learn which hosted models or backends support the feature.

ModelStreamTool CallingwithStructuredOutput()MultimodalDownloads
ChatOpenAI✅✅✅✅Downloads per month
ChatAnthropic✅✅✅✅Downloads per month
ChatBedrockConverse✅✅✅✅Downloads per month
ChatGroq✅✅✅❌Downloads per month
ChatOllama✅✅✅✅Downloads per month
ChatMistralAI✅✅✅✅Downloads per month
ChatGoogle✅✅✅✅Downloads per month
ChatXAI✅✅✅❌Downloads per month
ChatCohere✅✅✅❌Downloads per month
ChatFireworks✅✅✅❌Downloads per month
ChatCloudflareWorkersAI✅❌❌✅Downloads per month
ChatTogetherAI✅✅✅✅Downloads per month
ChatPerplexity✅❌✅❌Downloads per month

See the full list of chat model integrations below for more options.

Routers & proxies

Routers and proxies give you access to models from multiple providers through a single API and credential. They can simplify billing, let you switch between models without changing integrations, and offer features like automatic fallbacks.

ProviderIntegrationDescription
OpenRouterChatOpenRouterUnified access to models from OpenAI, Anthropic, Google, Meta, and more
FuturMixChatOpenAIUnified AI gateway for 22+ models with OpenAI-compatible API and 99.99% SLA

Chat Completions API

Certain model providers offer endpoints that are compatible with OpenAI's (legacy) Chat Completions API. In such case, you can use ChatOpenAI with a custom base_url to connect to these endpoints. Note that features built on top of the Chat Completions API may not be fully supported by ChatOpenAI; in such cases, consider using a provider-specific class if available.

All chat models

ModelStreamTool CallingwithStructuredOutput()MultimodalDownloads
AzureChatOpenAI✅✅✅✅Downloads per month
ChatOpenAI✅✅✅✅Downloads per month
ChatAnthropic✅✅✅✅Downloads per month
ChatGoogleGenerativeAI✅✅✅✅Downloads per month
ChatBedrockConverse✅✅✅✅Downloads per month
ChatVertexAI✅✅✅✅Downloads per month
ChatGroq✅✅✅❌Downloads per month
ChatOllama✅✅✅✅Downloads per month
ChatMistralAI✅✅✅✅Downloads per month
ChatGoogle✅✅✅✅Downloads per month
ChatXAI✅✅✅❌Downloads per month
ChatCohere✅✅✅❌Downloads per month
ChatOpenRouter✅✅✅✅Downloads per month
ChatDeepSeek✅✅✅❌Downloads per month
ChatCerebras✅✅✅❌Downloads per month
ChatFireworks✅✅✅❌Downloads per month
ChatBaiduQianfanDownloads per month
ChatCloudflareWorkersAI✅❌❌✅Downloads per month
ChatTogetherAI✅✅✅✅Downloads per month
ChatWatsonx✅✅✅✅Downloads per month
ChatPerplexity✅❌✅❌Downloads per month
ChatYandexGPTDownloads per month
ChatInterfaze✅✅✅✅Downloads per month
ChatKServe✅✅✅✅Downloads per month
ChatWebLLM✅✅✅Downloads per month
RecallToolkitDownloads per month
ChatSCX✅✅✅✅Downloads per month
Auxen✅✅✅❌N/A
ChatEmpirioLabs✅✅✅✅N/A
FakeListChatModelN/A
FuturMix✅✅✅✅N/A
Tuning Engines✅✅✅❌N/A

Info

If you'd like to contribute an integration, see Contributing integrations.