Add tool choice type

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

View File

@ -38,10 +38,22 @@ export interface ToolCallOptions {
tools?: Tool[];
}
// A specific tool choice to force the model to call
export interface ToolCallSpec {
type: 'function';
function: {
name: string;
};
}
// tool_choice may be one of several modes or a specific call
export type ToolChoice = 'none' | 'auto' | 'required' | ToolCallSpec;
export interface chatCompletionRequest {
model: string; // Model ID, though for local it might be implicit via sessionInfo
messages: chatCompletionRequestMessage[];
tools?: Tool[];
tool_choice?: ToolChoice;
// Core sampling parameters
temperature?: number | null
dynatemp_range?: number | null