Skip to content
1 min read · 117 words

Interface: ChatCompletionsTool

Defined in: batteries/llm/chat_common/types.ts:207

Wire shape of a single function tool advertised to the model — identical for OpenAI Chat Completions and Ollama.

Properties

PropertyTypeDescriptionDefined in
function{ description?: string; name: string; parameters?: JsonSchema; }The function declaration: its name, description, and JSON-Schema parameters.batteries/llm/chat_common/types.ts:211
function.description?string-batteries/llm/chat_common/types.ts:213
function.namestring-batteries/llm/chat_common/types.ts:212
function.parameters?JsonSchema-batteries/llm/chat_common/types.ts:214
type"function"Tool kind; always 'function' for the bundled batteries.batteries/llm/chat_common/types.ts:209