Update workflow
This commit is contained in:
68
types.ts
68
types.ts
@@ -12,6 +12,15 @@ export interface Assistant {
|
||||
hotwords: string[];
|
||||
}
|
||||
|
||||
export interface Voice {
|
||||
id: string;
|
||||
name: string;
|
||||
vendor: string;
|
||||
gender: string;
|
||||
language: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
export interface KnowledgeBase {
|
||||
id: string;
|
||||
name: string;
|
||||
@@ -36,21 +45,54 @@ export interface CallLog {
|
||||
agentName: string;
|
||||
}
|
||||
|
||||
export interface UserProfile {
|
||||
username: string;
|
||||
avatarUrl: string;
|
||||
email: string;
|
||||
language: 'zh' | 'en';
|
||||
}
|
||||
|
||||
export interface Voice {
|
||||
export interface Workflow {
|
||||
id: string;
|
||||
name: string;
|
||||
vendor: 'Ali' | 'Volcano' | 'Minimax';
|
||||
gender: 'Male' | 'Female';
|
||||
language: 'zh' | 'en';
|
||||
description?: string;
|
||||
previewUrl?: string; // Mock url
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user