@siact/sime-x-vue 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sime-x-vue.mjs +1264 -54
- package/dist/sime-x-vue.mjs.map +1 -1
- package/dist/sime-x-vue.umd.js +1263 -52
- package/dist/sime-x-vue.umd.js.map +1 -1
- package/dist/style.css +412 -83
- package/package.json +1 -1
- package/types/components/sime-provider.vue.d.ts +4 -4
- package/types/components/tool-card.vue.d.ts +28 -0
- package/types/components/voice-assistant.vue.d.ts +44 -0
- package/types/composables/index.d.ts +6 -0
- package/types/composables/use-agent-invoke.d.ts +79 -0
- package/types/composables/use-bubble.d.ts +39 -0
- package/types/composables/use-tts.d.ts +17 -0
- package/types/composables/use-voice-recognition.d.ts +28 -0
- package/types/index.d.ts +1 -0
- package/types/lib/data-stream-parser.d.ts +84 -0
- package/types/types.d.ts +11 -1
package/package.json
CHANGED
|
@@ -12,8 +12,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
|
|
|
12
12
|
appId: string;
|
|
13
13
|
/** appToken */
|
|
14
14
|
appToken: string;
|
|
15
|
-
/**
|
|
16
|
-
voiceConfig
|
|
15
|
+
/** 语音配置(可选,也可直接在 voiceAssistant 组件上传入) */
|
|
16
|
+
voiceConfig?: VoiceConfig | undefined;
|
|
17
17
|
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
18
18
|
/** 项目名称 */
|
|
19
19
|
project: string;
|
|
@@ -27,8 +27,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
|
|
|
27
27
|
appId: string;
|
|
28
28
|
/** appToken */
|
|
29
29
|
appToken: string;
|
|
30
|
-
/**
|
|
31
|
-
voiceConfig
|
|
30
|
+
/** 语音配置(可选,也可直接在 voiceAssistant 组件上传入) */
|
|
31
|
+
voiceConfig?: VoiceConfig | undefined;
|
|
32
32
|
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
33
33
|
default?(_: {}): any;
|
|
34
34
|
}>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ToolState } from '../lib/data-stream-parser';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
3
|
+
toolName: string;
|
|
4
|
+
toolCallId: string;
|
|
5
|
+
args?: any;
|
|
6
|
+
result?: any;
|
|
7
|
+
state: ToolState;
|
|
8
|
+
errorText?: string | undefined;
|
|
9
|
+
isExecuting?: boolean | undefined;
|
|
10
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
11
|
+
toolName: string;
|
|
12
|
+
toolCallId: string;
|
|
13
|
+
args?: any;
|
|
14
|
+
result?: any;
|
|
15
|
+
state: ToolState;
|
|
16
|
+
errorText?: string | undefined;
|
|
17
|
+
isExecuting?: boolean | undefined;
|
|
18
|
+
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
21
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
22
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
23
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
24
|
+
} : {
|
|
25
|
+
type: import('vue').PropType<T[K]>;
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { VoiceConfig } from '../types';
|
|
2
|
+
interface XSize {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
}
|
|
6
|
+
interface BubbleSize {
|
|
7
|
+
width?: string;
|
|
8
|
+
maxHeight?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
11
|
+
xLogo?: string | undefined;
|
|
12
|
+
xTitle?: string | undefined;
|
|
13
|
+
xSize?: XSize | undefined;
|
|
14
|
+
xTheme?: "light" | "dark" | "system" | undefined;
|
|
15
|
+
wakeWords?: string[] | undefined;
|
|
16
|
+
modelPath?: string | undefined;
|
|
17
|
+
projectId?: string | undefined;
|
|
18
|
+
invokeUrl?: string | undefined;
|
|
19
|
+
voiceConfig?: VoiceConfig | undefined;
|
|
20
|
+
bubbleSize?: BubbleSize | undefined;
|
|
21
|
+
bubbleDismissDelay?: number | undefined;
|
|
22
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
23
|
+
xLogo?: string | undefined;
|
|
24
|
+
xTitle?: string | undefined;
|
|
25
|
+
xSize?: XSize | undefined;
|
|
26
|
+
xTheme?: "light" | "dark" | "system" | undefined;
|
|
27
|
+
wakeWords?: string[] | undefined;
|
|
28
|
+
modelPath?: string | undefined;
|
|
29
|
+
projectId?: string | undefined;
|
|
30
|
+
invokeUrl?: string | undefined;
|
|
31
|
+
voiceConfig?: VoiceConfig | undefined;
|
|
32
|
+
bubbleSize?: BubbleSize | undefined;
|
|
33
|
+
bubbleDismissDelay?: number | undefined;
|
|
34
|
+
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
35
|
+
export default _default;
|
|
36
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
37
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
38
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
39
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
40
|
+
} : {
|
|
41
|
+
type: import('vue').PropType<T[K]>;
|
|
42
|
+
required: true;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { useTTS } from './use-tts';
|
|
2
|
+
export { useBubble } from './use-bubble';
|
|
3
|
+
export type { BubbleSize, UseBubbleOptions } from './use-bubble';
|
|
4
|
+
export { useVoiceRecognition } from './use-voice-recognition';
|
|
5
|
+
export type { VoiceStatus } from './use-voice-recognition';
|
|
6
|
+
export { useAgentInvoke } from './use-agent-invoke';
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
import { type ToolCallPart, type ToolResultPart } from '../lib/data-stream-parser';
|
|
3
|
+
import type { AiChatbotXContext } from '../types';
|
|
4
|
+
export interface UseAgentInvokeOptions {
|
|
5
|
+
endpoint: Ref<string>;
|
|
6
|
+
projectId?: string;
|
|
7
|
+
aiChatbotX: AiChatbotXContext;
|
|
8
|
+
/** TTS 控制 */
|
|
9
|
+
tts: {
|
|
10
|
+
speak: (text: string) => void;
|
|
11
|
+
feed: (delta: string) => void;
|
|
12
|
+
flush: () => void;
|
|
13
|
+
stop: () => void;
|
|
14
|
+
};
|
|
15
|
+
/** 气泡控制 */
|
|
16
|
+
bubble: {
|
|
17
|
+
open: () => void;
|
|
18
|
+
scheduleDismiss: () => void;
|
|
19
|
+
scrollToBottom: () => void;
|
|
20
|
+
};
|
|
21
|
+
/** 会话记忆超时(ms),超过此时间未发起新对话则自动清空历史,默认 120000(2分钟) */
|
|
22
|
+
sessionTimeoutMs?: number;
|
|
23
|
+
/** 最大保留历史轮数(一轮 = user + assistant),默认 10 */
|
|
24
|
+
maxHistoryTurns?: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Agent 调用 composable
|
|
28
|
+
*
|
|
29
|
+
* 管理 Agent 调用、流式解析、工具执行、文本/工具状态。
|
|
30
|
+
* 支持中断(abort)以便在唤醒时取消正在进行的调用。
|
|
31
|
+
*/
|
|
32
|
+
export declare function useAgentInvoke(options: UseAgentInvokeOptions): {
|
|
33
|
+
isInvoking: Ref<boolean, boolean>;
|
|
34
|
+
currentTextContent: Ref<string, string>;
|
|
35
|
+
currentToolParts: Ref<({
|
|
36
|
+
type: "tool-call";
|
|
37
|
+
toolCallId: string;
|
|
38
|
+
toolName: string;
|
|
39
|
+
args: any;
|
|
40
|
+
state: import("../lib/data-stream-parser").ToolState;
|
|
41
|
+
} | {
|
|
42
|
+
type: "tool-result";
|
|
43
|
+
toolCallId: string;
|
|
44
|
+
toolName: string;
|
|
45
|
+
args: any;
|
|
46
|
+
result: any;
|
|
47
|
+
state: import("../lib/data-stream-parser").ToolState;
|
|
48
|
+
})[], (ToolCallPart | ToolResultPart)[] | ({
|
|
49
|
+
type: "tool-call";
|
|
50
|
+
toolCallId: string;
|
|
51
|
+
toolName: string;
|
|
52
|
+
args: any;
|
|
53
|
+
state: import("../lib/data-stream-parser").ToolState;
|
|
54
|
+
} | {
|
|
55
|
+
type: "tool-result";
|
|
56
|
+
toolCallId: string;
|
|
57
|
+
toolName: string;
|
|
58
|
+
args: any;
|
|
59
|
+
result: any;
|
|
60
|
+
state: import("../lib/data-stream-parser").ToolState;
|
|
61
|
+
})[]>;
|
|
62
|
+
executingTools: Ref<Set<string> & Omit<Set<string>, keyof Set<any>>, Set<string> | (Set<string> & Omit<Set<string>, keyof Set<any>>)>;
|
|
63
|
+
hasAnyContent: import("vue").ComputedRef<boolean>;
|
|
64
|
+
conversationHistory: Ref<{
|
|
65
|
+
role: 'user' | 'assistant';
|
|
66
|
+
content: string;
|
|
67
|
+
}[], {
|
|
68
|
+
role: 'user' | 'assistant';
|
|
69
|
+
content: string;
|
|
70
|
+
}[] | {
|
|
71
|
+
role: 'user' | 'assistant';
|
|
72
|
+
content: string;
|
|
73
|
+
}[]>;
|
|
74
|
+
toolDisplayName: (name: string) => string;
|
|
75
|
+
invoke: (question: string) => Promise<void>;
|
|
76
|
+
abort: () => void;
|
|
77
|
+
resetState: () => void;
|
|
78
|
+
clearHistory: () => void;
|
|
79
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
export interface BubbleSize {
|
|
3
|
+
/** 气泡最大宽度,如 '380px' 或 '86vw' */
|
|
4
|
+
width?: string;
|
|
5
|
+
/** 气泡最大高度,如 '520px' 或 '58vh' */
|
|
6
|
+
maxHeight?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface UseBubbleOptions {
|
|
9
|
+
/** 自动消失延迟 (ms),默认 4000 */
|
|
10
|
+
dismissDelay?: number;
|
|
11
|
+
/** 外部 isSpeaking 引用,TTS 播报期间阻止消失 */
|
|
12
|
+
isSpeaking?: Ref<boolean>;
|
|
13
|
+
/** 外部 isInvoking 引用,调用期间阻止消失 */
|
|
14
|
+
isInvoking?: Ref<boolean>;
|
|
15
|
+
/** 气泡尺寸 */
|
|
16
|
+
bubbleSize?: BubbleSize;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* 气泡生命周期 composable
|
|
20
|
+
*
|
|
21
|
+
* 管理气泡显示/隐藏、自动消失倒计时、滚动。
|
|
22
|
+
* 核心保证:TTS 播报期间气泡绝不消失。
|
|
23
|
+
*/
|
|
24
|
+
export declare function useBubble(options?: UseBubbleOptions): {
|
|
25
|
+
visible: Ref<boolean, boolean>;
|
|
26
|
+
fadingOut: Ref<boolean, boolean>;
|
|
27
|
+
show: import("vue").ComputedRef<boolean>;
|
|
28
|
+
style: import("vue").ComputedRef<{
|
|
29
|
+
width: string | undefined;
|
|
30
|
+
maxHeight: string | undefined;
|
|
31
|
+
}>;
|
|
32
|
+
stackRef: Ref<HTMLElement | null, HTMLElement | null>;
|
|
33
|
+
open: () => void;
|
|
34
|
+
hide: () => void;
|
|
35
|
+
cancelDismiss: () => void;
|
|
36
|
+
scheduleDismiss: () => void;
|
|
37
|
+
scrollToBottom: () => void;
|
|
38
|
+
destroy: () => void;
|
|
39
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { VoiceConfig } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* TTS 语音播报 composable
|
|
4
|
+
*
|
|
5
|
+
* 管理讯飞 SpeechSynthesizerStandalone 的生命周期、
|
|
6
|
+
* 句子级缓冲、Markdown 清理、AudioContext 预热。
|
|
7
|
+
*/
|
|
8
|
+
export declare function useTTS(getVoiceConfig: () => VoiceConfig | null): {
|
|
9
|
+
isSpeaking: import("vue").Ref<boolean, boolean>;
|
|
10
|
+
warmUpAudio: () => void;
|
|
11
|
+
speak: (text: string) => Promise<void>;
|
|
12
|
+
feed: (delta: string) => void;
|
|
13
|
+
flush: () => void;
|
|
14
|
+
stop: () => void;
|
|
15
|
+
destroy: () => void;
|
|
16
|
+
setOnQueueEmpty: (cb: () => void) => void;
|
|
17
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { VoiceConfig } from '../types';
|
|
2
|
+
export type VoiceStatus = 'standby' | 'listening';
|
|
3
|
+
export interface UseVoiceRecognitionOptions {
|
|
4
|
+
modelPath?: string;
|
|
5
|
+
wakeWords?: string[];
|
|
6
|
+
getVoiceConfig: () => VoiceConfig | null;
|
|
7
|
+
/** 唤醒时回调 */
|
|
8
|
+
onWake?: () => void;
|
|
9
|
+
/** 转写完成(autoStop)时回调 */
|
|
10
|
+
onTranscriptionDone?: (text: string) => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 语音识别 composable
|
|
14
|
+
*
|
|
15
|
+
* 管理唤醒词检测器 + 语音转写器的生命周期。
|
|
16
|
+
*/
|
|
17
|
+
export declare function useVoiceRecognition(options: UseVoiceRecognitionOptions): {
|
|
18
|
+
voiceStatus: import("vue").Ref<VoiceStatus, VoiceStatus>;
|
|
19
|
+
isTranscribing: import("vue").Ref<boolean, boolean>;
|
|
20
|
+
isInitializing: import("vue").Ref<boolean, boolean>;
|
|
21
|
+
transcriptionText: import("vue").Ref<string, string>;
|
|
22
|
+
wakeAnimating: import("vue").Ref<boolean, boolean>;
|
|
23
|
+
startTranscribing: () => Promise<void>;
|
|
24
|
+
stopTranscribing: () => Promise<void>;
|
|
25
|
+
abortTranscription: () => Promise<void>;
|
|
26
|
+
toggleVoiceMode: (targetState?: boolean) => Promise<void>;
|
|
27
|
+
destroy: () => Promise<void>;
|
|
28
|
+
};
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { default as AiChatbotProvider } from './components/sime-provider.vue';
|
|
2
2
|
export { default as AiChatbotX } from './components/sime-x.vue';
|
|
3
|
+
export { default as AiChatbotVoiceAssistant } from './components/voice-assistant.vue';
|
|
3
4
|
export * from './injection-key';
|
|
4
5
|
export * from './types';
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI SDK Stream Protocol Parser for Vue
|
|
3
|
+
*
|
|
4
|
+
* Handles THREE possible response formats from the agent/chat service:
|
|
5
|
+
*
|
|
6
|
+
* Format A – UI Message Stream Protocol (pipeUIMessageStreamToResponse) ★ PRIMARY
|
|
7
|
+
* SSE format with JSON objects containing a "type" field:
|
|
8
|
+
* data: {"type":"start","messageId":"..."}
|
|
9
|
+
* data: {"type":"text-delta","id":"...","delta":"Hello"}
|
|
10
|
+
* data: {"type":"tool-input-start","toolCallId":"...","toolName":"..."}
|
|
11
|
+
* data: {"type":"tool-input-delta","toolCallId":"...","inputTextDelta":"..."}
|
|
12
|
+
* data: {"type":"tool-input-available","toolCallId":"...","toolName":"...","input":{...}}
|
|
13
|
+
* data: {"type":"tool-output-available","toolCallId":"...","output":{...}}
|
|
14
|
+
* data: {"type":"finish-step"}
|
|
15
|
+
* data: {"type":"finish"}
|
|
16
|
+
* data: [DONE]
|
|
17
|
+
*
|
|
18
|
+
* Format B – Legacy Data Stream Protocol (pipeDataStreamToResponse)
|
|
19
|
+
* Each line: CODE:JSON_VALUE\n
|
|
20
|
+
* 0:"text" 9:{toolCallId,toolName} c:{toolCallId,toolName,args} a:{toolCallId,result}
|
|
21
|
+
*
|
|
22
|
+
* Format C – Plain text stream (pipeTextStreamToResponse fallback)
|
|
23
|
+
* Raw UTF-8 text chunks with no protocol framing.
|
|
24
|
+
*
|
|
25
|
+
* The parser auto-detects the format from the first chunk.
|
|
26
|
+
*/
|
|
27
|
+
export type ToolState = 'partial-call' | 'call' | 'result' | 'error';
|
|
28
|
+
export interface TextPart {
|
|
29
|
+
type: 'text';
|
|
30
|
+
text: string;
|
|
31
|
+
}
|
|
32
|
+
export interface ToolCallPart {
|
|
33
|
+
type: 'tool-call';
|
|
34
|
+
toolCallId: string;
|
|
35
|
+
toolName: string;
|
|
36
|
+
args: any;
|
|
37
|
+
state: ToolState;
|
|
38
|
+
}
|
|
39
|
+
export interface ToolResultPart {
|
|
40
|
+
type: 'tool-result';
|
|
41
|
+
toolCallId: string;
|
|
42
|
+
toolName: string;
|
|
43
|
+
args: any;
|
|
44
|
+
result: any;
|
|
45
|
+
state: ToolState;
|
|
46
|
+
}
|
|
47
|
+
export type MessagePart = TextPart | ToolCallPart | ToolResultPart;
|
|
48
|
+
export interface StreamMessage {
|
|
49
|
+
id: string;
|
|
50
|
+
role: 'user' | 'assistant';
|
|
51
|
+
parts: MessagePart[];
|
|
52
|
+
createdAt: number;
|
|
53
|
+
}
|
|
54
|
+
interface ToolCallTracker {
|
|
55
|
+
toolCallId: string;
|
|
56
|
+
toolName: string;
|
|
57
|
+
argsText: string;
|
|
58
|
+
args: any;
|
|
59
|
+
result?: any;
|
|
60
|
+
state: ToolState;
|
|
61
|
+
}
|
|
62
|
+
export type StreamEventType = 'text-delta' | 'tool-call-start' | 'tool-call-delta' | 'tool-call-complete' | 'tool-result' | 'step-finish' | 'finish' | 'error';
|
|
63
|
+
export interface StreamEvent {
|
|
64
|
+
type: StreamEventType;
|
|
65
|
+
data: any;
|
|
66
|
+
}
|
|
67
|
+
export interface DataStreamCallbacks {
|
|
68
|
+
onTextDelta?: (text: string) => void;
|
|
69
|
+
onToolCallStart?: (toolCallId: string, toolName: string) => void;
|
|
70
|
+
onToolCallDelta?: (toolCallId: string, argsTextDelta: string) => void;
|
|
71
|
+
onToolCallComplete?: (toolCallId: string, toolName: string, args: any) => void;
|
|
72
|
+
onToolResult?: (toolCallId: string, result: any) => void;
|
|
73
|
+
onStepFinish?: (data: any) => void;
|
|
74
|
+
onFinish?: (data: any) => void;
|
|
75
|
+
onError?: (error: string) => void;
|
|
76
|
+
}
|
|
77
|
+
export declare function readDataStream(response: Response, callbacks: DataStreamCallbacks): Promise<void>;
|
|
78
|
+
export interface StreamParseResult {
|
|
79
|
+
textContent: string;
|
|
80
|
+
parts: MessagePart[];
|
|
81
|
+
toolCalls: Map<string, ToolCallTracker>;
|
|
82
|
+
}
|
|
83
|
+
export declare function parseDataStreamToMessage(response: Response, onUpdate: (result: StreamParseResult) => void): Promise<StreamParseResult>;
|
|
84
|
+
export {};
|
package/types/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CommandDefinition, DiscoveredCommand } from
|
|
1
|
+
import type { CommandDefinition, DiscoveredCommand } from '@siact/sime-bridge';
|
|
2
2
|
export declare enum clientCommandKey {
|
|
3
3
|
SET_THEME = "SiMeAgent_setTheme",
|
|
4
4
|
APPEND_MESSAGE = "SiMeAgent_appendMessage",
|
|
@@ -10,8 +10,18 @@ export declare enum clientCommandKey {
|
|
|
10
10
|
}
|
|
11
11
|
export interface VoiceConfig {
|
|
12
12
|
appId: string;
|
|
13
|
+
/** STT(语音转写)apiKey */
|
|
13
14
|
apiKey: string;
|
|
15
|
+
/** apiSecret,TTS 鉴权必需 */
|
|
16
|
+
apiSecret?: string;
|
|
17
|
+
/** STT(语音转写)WebSocket 地址 */
|
|
14
18
|
websocketUrl: string;
|
|
19
|
+
/** TTS apiKey(可选,不填则复用 apiKey) */
|
|
20
|
+
ttsApiKey?: string;
|
|
21
|
+
/** TTS(语音合成)WebSocket 地址 */
|
|
22
|
+
ttsWebsocketUrl?: string;
|
|
23
|
+
/** TTS 发音人,默认 xiaoyan */
|
|
24
|
+
ttsVcn?: string;
|
|
15
25
|
}
|
|
16
26
|
export interface AiChatbotXContext {
|
|
17
27
|
chatbotUrl: () => string;
|