View Source LangChain.ChatModels.ChatModel behaviour (LangChain v0.3.0-rc.0)
Summary
Functions
Add a LangChain.ChatModels.LLMCallbacks
callback map to the ChatModel if
it includes the :callback
key.
Restore a ChatModel from a serialized config map.
Create a serializable map from a ChatModel's current configuration that can later be restored.
Types
@type call_response() :: {:ok, LangChain.Message.t() | [LangChain.Message.t()] | [LangChain.MessageDelta.t()]} | {:error, String.t()}
@type t() :: Ecto.Schema.t()
@type tool() :: LangChain.Function.t()
@type tools() :: [tool()]
Callbacks
@callback call( t(), String.t() | [LangChain.Message.t()], [LangChain.Function.t()] ) :: call_response()
Functions
Add a LangChain.ChatModels.LLMCallbacks
callback map to the ChatModel if
it includes the :callback
key.
@spec restore_from_map(nil | %{required(String.t()) => any()}) :: {:ok, struct()} | {:error, String.t()}
Restore a ChatModel from a serialized config map.
Create a serializable map from a ChatModel's current configuration that can later be restored.