Add manual opener tool calls to Assistant model and API
- Introduced `manual_opener_tool_calls` field in the Assistant model to support custom tool calls. - Updated AssistantBase and AssistantUpdate schemas to include the new field. - Implemented normalization and migration logic for handling manual opener tool calls in the API. - Enhanced runtime metadata to include manual opener tool calls in responses. - Updated tests to validate the new functionality and ensure proper handling of tool calls. - Refactored tool ID normalization to support legacy tool names for backward compatibility.
This commit is contained in:
@@ -5,6 +5,7 @@ export interface Assistant {
|
||||
callCount: number;
|
||||
firstTurnMode?: 'bot_first' | 'user_first';
|
||||
opener: string;
|
||||
manualOpenerToolCalls?: AssistantOpenerToolCall[];
|
||||
generatedOpenerEnabled?: boolean;
|
||||
openerAudioEnabled?: boolean;
|
||||
openerAudioReady?: boolean;
|
||||
@@ -29,6 +30,11 @@ export interface Assistant {
|
||||
rerankModelId?: string;
|
||||
}
|
||||
|
||||
export interface AssistantOpenerToolCall {
|
||||
toolName: string;
|
||||
arguments?: string | Record<string, any>;
|
||||
}
|
||||
|
||||
export interface Voice {
|
||||
id: string;
|
||||
name: string;
|
||||
|
||||
Reference in New Issue
Block a user