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