g-ai-robot3 0.1.33 → 0.1.34

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
@@ -1,82 +1,82 @@
1
- # g-ai-robot3
2
-
3
- ## 简介
4
- ```
5
- 封装了QA问答和语音问答功能(vue3版本)
6
- ```
7
-
8
- ### 安装(npm or yarn)
9
- ```
10
- npm install g-ai-robot3 --save
11
- ```
12
-
13
- ### 使用
14
- ``` javascript
15
- import gAiRobot from "g-ai-robot";
16
- import "g-ai-robot3/dist/g-ai-robot3.css"
17
-
18
- <g-ai-robot
19
- :robotCss="{ zIndex: 9999, left: '10px', bottom: '300px' }"
20
- placement="top-end"
21
- >
22
- </g-ai-robot>
23
-
24
- ```
25
-
26
-
27
- # props
28
- | 参数 | 说明 | 类型 | 可选值 | 默认值 |
29
- |---------- |-------------------|------------|---------|---------|
30
- | isDebug | 开启debug打印 | Boolean | - | - |
31
- | title | 问答标题 | String | - | - |
32
- | greet | 问答问候语 | String | - | - |
33
- | waitTxt | 问答等候语 | String | - | - |
34
- | systemName | 系统编码 | String | - | - |
35
- | robotCss | 机器人在视口中的位置 | object | - | left: "10px", bottom: "10px" |
36
- | placement | 问答弹窗位置 |String | left/right/top/bottom/top-start/top-end/bottom-start/bottom-end | top-end |
37
- | useAudio | 语音功能 |Boolean | true/false | true |
38
- | space | 监听时间间隔 |Number | - | 3000 |
39
- | mode | 交互模式 |String | text/audio | text |
40
- | openInstruct | 是否开启指令控制 |Boolean | true/false | true |
41
- | qaServer | 问答服务地址 |String | - | - |
42
- | audioServer | 语音服务地址 |String | - | - |
43
- | cozeInfo | 扣字大模型参数 |Object | - | - |
44
- | wsServer | 语音监听地址 |String | - | - |
45
- | instructWs | 指令监听地址 |String | - | - |
46
- | eventFun | 触发事件 |Array | - | - |
47
- | searchTextCallback | 扣子大模型事件流回调函数 |Function | - | - |
48
-
49
-
50
-
51
- # cozeInfo
52
- | 参数 | 说明 | 类型 | 可选值 | 默认值 |
53
- |---------- |-------------------|------------|---------|---------|
54
- | iss | | String | - | - |
55
- | kid | | String | - | - |
56
- | private_key | | String | - | - |
57
- | bot_id | | String | - | - |
58
-
59
-
60
- # eventFun
61
- | 参数 | 说明 | 类型 | 可选值 | 默认值 |
62
- |---------- |-------------------|------------|---------|---------|
63
- | keywords | 触发关键字 | Array | - | - |
64
- | trigger | 回调触发时机 | String | after/together | - |
65
- | fun | 触发的回调函数 | Function | - | - |
66
-
67
-
68
- # 方法
69
- | 参数 | 说明 | 参数 |
70
- |---------- |------------------ |--------------|
71
- | searchText | 问答接口 |接收一个参数:{searchText} 问题的字符串 |
72
- | startMonitorAudio | 开启语音监听 | - |
73
- | uploadWavFile | 语音转文字接口 |接收一个参数(formData类型):{modelName,audio} modelName:语音模型(tiny/base/small/medium/large), audio:语音文件流 |
74
-
75
- # Slot
76
- | 参数 | 说明 |
77
- |---------- |--------------|
78
- | reference | 触发问答弹窗显示的HTML元素 |
79
-
80
-
81
-
82
-
1
+ # g-ai-robot3
2
+
3
+ ## 简介
4
+ ```
5
+ 封装了QA问答和语音问答功能(vue3版本)
6
+ ```
7
+
8
+ ### 安装(npm or yarn)
9
+ ```
10
+ npm install g-ai-robot3 --save
11
+ ```
12
+
13
+ ### 使用
14
+ ``` javascript
15
+ import gAiRobot from "g-ai-robot";
16
+ import "g-ai-robot3/dist/g-ai-robot3.css"
17
+
18
+ <g-ai-robot
19
+ :robotCss="{ zIndex: 9999, left: '10px', bottom: '300px' }"
20
+ placement="top-end"
21
+ >
22
+ </g-ai-robot>
23
+
24
+ ```
25
+
26
+
27
+ # props
28
+ | 参数 | 说明 | 类型 | 可选值 | 默认值 |
29
+ |---------- |-------------------|------------|---------|---------|
30
+ | isDebug | 开启debug打印 | Boolean | - | - |
31
+ | title | 问答标题 | String | - | - |
32
+ | greet | 问答问候语 | String | - | - |
33
+ | waitTxt | 问答等候语 | String | - | - |
34
+ | systemName | 系统编码 | String | - | - |
35
+ | robotCss | 机器人在视口中的位置 | object | - | left: "10px", bottom: "10px" |
36
+ | placement | 问答弹窗位置 |String | left/right/top/bottom/top-start/top-end/bottom-start/bottom-end | top-end |
37
+ | useAudio | 语音功能 |Boolean | true/false | true |
38
+ | space | 监听时间间隔 |Number | - | 3000 |
39
+ | mode | 交互模式 |String | text/audio | text |
40
+ | openInstruct | 是否开启指令控制 |Boolean | true/false | true |
41
+ | qaServer | 问答服务地址 |String | - | - |
42
+ | audioServer | 语音服务地址 |String | - | - |
43
+ | cozeInfo | 扣字大模型参数 |Object | - | - |
44
+ | wsServer | 语音监听地址 |String | - | - |
45
+ | instructWs | 指令监听地址 |String | - | - |
46
+ | eventFun | 触发事件 |Array | - | - |
47
+ | searchTextCallback | 扣子大模型事件流回调函数 |Function | - | - |
48
+
49
+
50
+
51
+ # cozeInfo
52
+ | 参数 | 说明 | 类型 | 可选值 | 默认值 |
53
+ |---------- |-------------------|------------|---------|---------|
54
+ | iss | | String | - | - |
55
+ | kid | | String | - | - |
56
+ | private_key | | String | - | - |
57
+ | bot_id | | String | - | - |
58
+
59
+
60
+ # eventFun
61
+ | 参数 | 说明 | 类型 | 可选值 | 默认值 |
62
+ |---------- |-------------------|------------|---------|---------|
63
+ | keywords | 触发关键字 | Array | - | - |
64
+ | trigger | 回调触发时机 | String | after/together | - |
65
+ | fun | 触发的回调函数 | Function | - | - |
66
+
67
+
68
+ # 方法
69
+ | 参数 | 说明 | 参数 |
70
+ |---------- |------------------ |--------------|
71
+ | searchText | 问答接口 |接收一个参数:{searchText} 问题的字符串 |
72
+ | startMonitorAudio | 开启语音监听 | - |
73
+ | uploadWavFile | 语音转文字接口 |接收一个参数(formData类型):{modelName,audio} modelName:语音模型(tiny/base/small/medium/large), audio:语音文件流 |
74
+
75
+ # Slot
76
+ | 参数 | 说明 |
77
+ |---------- |--------------|
78
+ | reference | 触发问答弹窗显示的HTML元素 |
79
+
80
+
81
+
82
+