View Source Train.Agents.ConversationalChatAgent (train v0.0.1-dev)
Link to this section Summary
Functions
Calls the agent with the given question and tools. It returns :ok, the list of messages used in the OpenAI's api, and the response.
Creates the system prompt for the agent.
Link to this section Functions
@spec call(Train.LlmChain.t(), String.t(), String.t()) :: {:ok, [String.t()], String.t()} | {:error, [String.t()], String.t()}
Calls the agent with the given question and tools. It returns :ok, the list of messages used in the OpenAI's api, and the response.
A previous conversation can be passed as the 3rd parameter (messages).
@spec create_prompt(Train.Agents.PromptSpec.t(), String.t(), [Train.ToolSpec.t()], [ String.t() ]) :: [ String.t() ]
Creates the system prompt for the agent.