View Source LangChain.ChatModels.ChatMistralAI (LangChain v0.3.3)
Summary
Functions
Calls the Mistral API passing the ChatMistralAI struct plus either a simple string prompt or a list of messages as the prompt. Optionally pass in a list of tools.
Converts a LangChain Message-based structure into the expected map of data for
Mistral. We also include any tool_calls
stored on the message.
Formats this struct plus the given messages and tools as a request payload.
Restores the model from the config map.
Generate a config map that can later restore the model's configuration.
Types
Functions
Calls the Mistral API passing the ChatMistralAI struct plus either a simple string prompt or a list of messages as the prompt. Optionally pass in a list of tools.
@spec for_api( struct(), LangChain.Message.t() | LangChain.Message.ContentPart.t() | LangChain.Message.ToolCall.t() | LangChain.Message.ToolResult.t() | LangChain.Function.t() ) :: %{required(String.t()) => any()} | [%{required(String.t()) => any()}]
Converts a LangChain Message-based structure into the expected map of data for
Mistral. We also include any tool_calls
stored on the message.
@spec for_api(t(), [LangChain.Message.t()], LangChain.ChatModels.ChatModel.tools()) :: %{ required(atom()) => any() }
Formats this struct plus the given messages and tools as a request payload.
@spec new(attrs :: map()) :: {:ok, t()} | {:error, Ecto.Changeset.t()}
Restores the model from the config map.
Generate a config map that can later restore the model's configuration.