g-ai-robot3 1.1.0 → 1.1.1

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/README.md CHANGED
@@ -195,7 +195,7 @@ const eventFun = [
195
195
 
196
196
  - 忽略 `eventFun`
197
197
  - 不做关键词匹配
198
- - 每次 AI 返回 `data` 时直接触发 `onAgentResponse`
198
+ - 每次 AI 返回 `data` 时直接触发 `agent-response`
199
199
  - 由业务层自行决定如何处理返回 JSON
200
200
  - 发送请求时 `searchText` 会升级为 `JSON.stringify({ msg, data })` 后的字符串;`msg` 为用户输入或补问组装文本,`data` 为外部传入的最新 `data` prop
201
201
 
@@ -217,7 +217,7 @@ const handleAgentResponse = (params: any) => {
217
217
  mode="video"
218
218
  driverMode="agent"
219
219
  :data="agentContext"
220
- @onAgentResponse="handleAgentResponse"
220
+ @agent-response="handleAgentResponse"
221
221
  />
222
222
  </template>
223
223
  ```
@@ -36,7 +36,7 @@ export interface UseQADialogDeps {
36
36
  currentChatId: Ref<string>;
37
37
  currentConversationId: Ref<string>;
38
38
  eventFun: WorkflowEventHandler[];
39
- onAgentResponse: (params: any) => void;
39
+ onAgentData: (params: any) => void;
40
40
  cancelChat: (conversationId: string, chatId: string) => Promise<boolean>;
41
41
  input: Ref<string>;
42
42
  inputRecognitionType: Ref<string>;
@@ -18,7 +18,7 @@ export interface UseStreamAnswerDeps {
18
18
  msgList: Ref<MsgItem[]>;
19
19
  digitalHumanRef: Ref<any>;
20
20
  eventFun: WorkflowEventHandler[];
21
- onAgentResponse: (params: any) => void;
21
+ onAgentData: (params: any) => void;
22
22
  stopOrderPlayAudio: () => void;
23
23
  addAudioToQueue: (url: string, interrupt: boolean) => void;
24
24
  clarifyContext?: ClarifyContext;