View Source LangChain.ChatModels.ChatMistralAI (LangChain v0.3.0-rc.0)

Summary

Types

@type t() :: %LangChain.ChatModels.ChatMistralAI{
  api_key: term(),
  callbacks: term(),
  endpoint: term(),
  max_tokens: term(),
  model: term(),
  random_seed: term(),
  receive_timeout: term(),
  safe_prompt: term(),
  stream: term(),
  temperature: term(),
  top_p: term()
}

Functions

Link to this function

do_api_request(mistral, messages, functions, retry_count \\ 3)

View Source
@spec do_api_request(
  t(),
  [LangChain.Message.t()],
  [LangChain.Function.t()],
  integer()
) ::
  list() | struct() | {:error, String.t()}
Link to this function

for_api(mistral, messages, functions)

View Source
@spec for_api(t(), message :: [map()], functions :: [map()]) :: %{
  required(atom()) => any()
}
@spec new(attrs :: map()) :: {:ok, t()} | {:error, Ecto.Changeset.t()}
@spec new!(attrs :: map()) :: t() | no_return()

Restores the model from the config.

@spec serialize_config(t()) :: %{required(String.t()) => any()}

Generate a config map that can later restore the model's configuration.