AI.Completion (fnord v0.8.17)
View SourceThis module sends a request to the model and handles the response. It is able to handle tool calls and responses.
Input options
toolbox
- a map of tool names to modules implementingAI.Tools
; the specs list is derived automatically viaAI.Tools.toolbox_to_specs/1
.
Output options
Output is controlled by the following mechanisms.
log_msgs
- log messages from the user and assistant asinfo
log_tool_calls
- log tool calls asinfo
and tool call results asdebug
LOGGER_LEVEL
must be set to debug
to see the output of tool call results.
Summary
Types
@type t() :: %AI.Completion{ archive_notes: boolean(), log_msgs: boolean(), log_tool_calls: boolean(), messages: list(), model: String.t(), opts: Keyword.t(), replay_conversation: boolean(), response: String.t() | nil, specs: [AI.Tools.tool_spec()] | nil, tool_call_requests: list(), toolbox: AI.Tools.toolbox() | nil, usage: integer() }