Add tool choice type
This commit is contained in:
parent
6d5251d1c6
commit
6b86baaa2f
@ -38,10 +38,22 @@ export interface ToolCallOptions {
|
|||||||
tools?: Tool[];
|
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 {
|
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?: Tool[];
|
tools?: Tool[];
|
||||||
|
tool_choice?: ToolChoice;
|
||||||
// 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