AI.CompletionAPI (fnord v0.8.83)
View SourceSummary
Types
@type model() :: AI.Model.t()
@type msgs() :: [map()]
@type response() :: msg_response() | tool_response() | {:error, map()} | {:error, :api_unavailable, any()} | {:error, :context_length_exceeded, non_neg_integer()}
@type response_format() :: nil | map()
@type tool_response() :: {:ok, :tool, [map()]}
@type tools() :: nil | [AI.Tools.tool_spec()]
@type usage() :: non_neg_integer()
@type web_search?() :: boolean()
Functions
@spec get(model(), msgs(), tools(), response_format(), web_search?()) :: response()