omnirtc-web 1.5.0 → 1.6.0

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
@@ -95,7 +95,7 @@ AIGC能力是RTC能力的扩展,要正常使用AIGC能力,需要先保证RTC
95
95
  ## 引入AIGC模块
96
96
  - ES Module引入
97
97
  ```javascript
98
- import { Aigc } from 'omnirtc-web';
98
+ import { Aigc } from 'omnirtc-web/aigc';
99
99
  ```
100
100
 
101
101
  ## 初始化
@@ -131,7 +131,7 @@ aigc.start('voicechat', aigcConfig, robotId, otherConfig);
131
131
  ## 对话中更新配置
132
132
 
133
133
  ```javascript
134
- import { TaskTypeEnum } from 'omnirtc-web'
134
+ import { TaskTypeEnum } from 'omnirtc-web/aigc'
135
135
  // 更细提示词
136
136
  const data = {
137
137
  prompt: '你是一个一对一英语老师,接下来的对话使用英语回复我,并且纠正我的语法和单词错误'
@@ -141,6 +141,15 @@ aigc.update(TaskTypeEnum.UPDATE_PROMPT, data)
141
141
  // 更多功能可以查看TaskTypeEnum的定义
142
142
  ```
143
143
 
144
+ ## 绑定RTCClient与Aigc实例,接收来自rtc房间的aigc消息
145
+ ```javascript
146
+ import { Events } from 'omnirtc-web/aigc'
147
+ aigc.on(Events.MESSAGE, (data) => {
148
+ console.log('receive aigc message: ', data)
149
+ })
150
+ aigc.bind(client);
151
+ ```
152
+
144
153
  ## 停止Aigc
145
154
 
146
155
  ```javascript