Skip to content
1 min read · 117 words

Interface: ChatCompletionsTool

Defined in: src/batteries/llm/chat_common/types.ts:249

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.src/batteries/llm/chat_common/types.ts:253
function.description?string-src/batteries/llm/chat_common/types.ts:255
function.namestring-src/batteries/llm/chat_common/types.ts:254
function.parameters?JsonSchema-src/batteries/llm/chat_common/types.ts:256
type"function"Tool kind; always 'function' for the bundled batteries.src/batteries/llm/chat_common/types.ts:251