Files
ai-videoassistant-frontend/types.ts
2026-02-02 10:10:24 +08:00

102 lines
1.7 KiB
TypeScript

export interface Assistant {
id: string;
name: string;
callCount: number;
opener: string;
prompt: string;
knowledgeBaseId: string;
language: 'zh' | 'en';
voice: string;
speed: number;
hotwords: string[];
}
export interface Voice {
id: string;
name: string;
vendor: string;
gender: string;
language: string;
description: string;
}
export interface KnowledgeBase {
id: string;
name: string;
creator: string;
createdAt: string;
documents: KnowledgeDocument[];
}
export interface KnowledgeDocument {
id: string;
name: string;
size: string;
uploadDate: string;
}
export interface CallLog {
id: string;
source: 'debug' | 'external';
status: 'connected' | 'missed';
startTime: string;
duration: string;
agentName: string;
}
export interface Workflow {
id: string;
name: string;
nodeCount: number;
createdAt: string;
updatedAt: string;
nodes: WorkflowNode[];
edges: WorkflowEdge[];
globalPrompt?: string;
}
export interface WorkflowNode {
name: string;
type: 'conversation' | 'tool' | 'human' | 'end';
isStart?: boolean;
metadata: {
position: { x: number; y: number };
};
prompt?: string;
messagePlan?: {
firstMessage?: string;
};
variableExtractionPlan?: {
output: Array<{
type: string;
title: string;
description: string;
}>;
};
tool?: {
type: string;
function: {
name: string;
parameters: any;
};
destinations?: any[];
messages?: any[];
};
globalNodePlan?: {
enabled: boolean;
enterCondition: string;
};
}
export interface WorkflowEdge {
from: string;
to: string;
label?: string;
}
export enum TabValue {
GLOBAL = 'global',
VOICE = 'voice'
}