chat_loaders.utils.map_ai_messages_in_session(...)
Convert messages from the specified 'sender' to AI messages.
chat_loaders.utils.merge_chat_runs(chat_sessions)
Merge chat runs together.
chat_loaders.utils.merge_chat_runs_in_session(...)
Merge chat runs together in a chat session.
langchain.chat_models¶
Chat Models are a variation on language models.
While Chat Models use language models under the hood, the interface they expose
is a bit different. Rather than expose a “text in, text out” API, they expose
an interface where “chat messages” are the inputs and outputs.
Class hierarchy:
BaseLanguageModel --> BaseChatModel --> <name>  # Examples: ChatOpenAI, ChatGooglePalm
Main helpers:
AIMessage, BaseMessage, HumanMessage
Classes¶
chat_models.anthropic.ChatAnthropic
Anthropic chat large language models.
chat_models.anyscale.ChatAnyscale
Anyscale Chat large language models.
chat_models.azure_openai.AzureChatOpenAI
Azure OpenAI Chat Completion API.
chat_models.azureml_endpoint.AzureMLChatOnlineEndpoint
AzureML Chat models API.
chat_models.azureml_endpoint.LlamaContentFormatter()
Content formatter for LLaMA.
chat_models.baidu_qianfan_endpoint.QianfanChatEndpoint
Baidu Qianfan chat models.
chat_models.base.BaseChatModel
Base class for Chat models.
chat_models.base.SimpleChatModel
Simple Chat Model.
chat_models.bedrock.BedrockChat
Create a new model by parsing and validating input data from keyword arguments.
chat_models.bedrock.ChatPromptAdapter()
Adapter class to prepare the inputs from Langchain to prompt format that Chat model expects.
chat_models.ernie.ErnieBotChat
ERNIE-Bot large language model.
chat_models.fake.FakeListChatModel
Fake ChatModel for testing purposes.