AI.ChatCompletion (fnord v0.7.16)

View Source

Summary

Types

model()

@type model() :: AI.Model.t()

msg_response()

@type msg_response() :: {:ok, :msg, String.t(), usage()}

msgs()

@type msgs() :: [map()]

response()

@type response() :: msg_response() | tool_response() | {:error, map()}

tool_response()

@type tool_response() :: {:ok, :tool, [map()]}

tools()

@type tools() :: nil | [AI.Tools.tool_spec()]

usage()

@type usage() :: integer()

Functions

get(model, msgs, tools \\ nil)

@spec get(model(), msgs(), tools()) :: response()