View Source AI.Completion (fnord v0.5.8)
This module sends a request to the model and handles the response. It is able to handle tool calls and responses.
Summary
Types
@type error() :: {:error, String.t()}
@type success() :: {:ok, t()}
@type t() :: %AI.Completion{ ai: AI.t(), log_msgs: boolean(), log_tool_call_results: boolean(), log_tool_calls: boolean(), max_tokens: non_neg_integer(), messages: list(), model: String.t(), opts: Keyword.t(), replay_conversation: boolean(), response: String.t() | nil, tool_call_requests: list(), tools: list(), use_planner: boolean() }