Fixup tool type definition
This commit is contained in:
parent
7f25311d26
commit
6d5251d1c6
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user