feat: add system tools and state updates
This commit is contained in:
@@ -216,6 +216,12 @@ export type StartupConfig = {
|
||||
} | null;
|
||||
};
|
||||
|
||||
export type SystemToolKind =
|
||||
| "end_conversation"
|
||||
| "update_state"
|
||||
| "skip_turn"
|
||||
| "request_human_handoff";
|
||||
|
||||
/** 后端 AssistantOut(宽表 STI:瘦字段平铺,workflow 用 graph)。apiKey 读时打码 */
|
||||
export type Assistant = {
|
||||
id: string;
|
||||
@@ -226,6 +232,7 @@ export type Assistant = {
|
||||
enableInterrupt: boolean;
|
||||
turnConfig: TurnConfig;
|
||||
startup: StartupConfig;
|
||||
systemTools: SystemToolKind[];
|
||||
visionEnabled: boolean;
|
||||
visionModelResourceId: string | null;
|
||||
modelResourceIds: Partial<Record<ModelType, string>>;
|
||||
@@ -354,10 +361,11 @@ export type ToolParameter = {
|
||||
required: boolean;
|
||||
};
|
||||
|
||||
export type EndCallToolDefinition = {
|
||||
export type SystemToolDefinition = {
|
||||
schemaVersion: number;
|
||||
type: "end_call";
|
||||
type: "system";
|
||||
config: {
|
||||
kind: "end_conversation";
|
||||
messageType: "none" | "custom";
|
||||
customMessage: string;
|
||||
captureReason: boolean;
|
||||
@@ -411,10 +419,10 @@ export type Tool = {
|
||||
id: string;
|
||||
name: string;
|
||||
functionName: string;
|
||||
type: "end_call" | "http" | "mcp" | "client";
|
||||
type: "system" | "http" | "mcp" | "client";
|
||||
description: string;
|
||||
definition:
|
||||
| EndCallToolDefinition
|
||||
| SystemToolDefinition
|
||||
| HttpToolDefinition
|
||||
| ClientToolDefinition
|
||||
| McpToolDefinition;
|
||||
|
||||
Reference in New Issue
Block a user