Fixup tool type definition

This commit is contained in:
Akarshan 2025-06-23 16:39:52 +05:30 committed by Louis
parent 7f25311d26
commit 6d5251d1c6
No known key found for this signature in database
GPG Key ID: 44FA9F4D33C37DE2

View File

@ -23,25 +23,25 @@ export interface InputAudio {
} }
export interface ToolFunction { export interface ToolFunction {
name: string; // Required: a-z, A-Z, 0-9, _, - (max length: 64) name: string; // Required: a-z, A-Z, 0-9, _, -, max length 64
description?: string; // Optional description?: string;
parameters?: Record<string, unknown>; // Optional: JSON Schema object parameters?: Record<string, unknown>; // JSON Schema object
strict?: boolean | null; // Optional: defaults to false strict?: boolean | null; // Defaults to false
type: 'function'
} }
export interface ToolCall { export interface Tool {
type: 'function'; // Currently, only 'function' is supported
function: ToolFunction; function: ToolFunction;
} }
export interface ToolDefinition { export interface ToolCallOptions {
tools?: ToolCall[]; tools?: Tool[];
} }
export interface chatCompletionRequest { export interface chatCompletionRequest {
model: string; // Model ID, though for local it might be implicit via sessionInfo model: string; // Model ID, though for local it might be implicit via sessionInfo
messages: chatCompletionRequestMessage[]; messages: chatCompletionRequestMessage[];
tools?: ToolFunction[]; tools?: Tool[];
// Core sampling parameters // Core sampling parameters
temperature?: number | null temperature?: number | null
dynatemp_range?: number | null dynatemp_range?: number | null