0.1.33 • Published 12 months ago

g-ai-robot v0.1.33

Weekly downloads
-
License
-
Repository
-
Last release
12 months ago

g-ai-robot

简介

封装了QA问答和语音问答功能(vue2版本)

安装(npm or yarn)

npm install g-ai-robot --save

使用

import gAiRobot from "g-ai-robot";
import "g-ai-robot/dist/g-ai-robot.css"

components: {
    gAiRobot,
}

<g-ai-robot
  :robotCss="{ zIndex: 9999, right: '10px', top: '300px' }"
  placement="left"
>
</g-ai-robot>

props

参数说明类型可选值默认值
title问答标题String--
greet问答问候语String--
waitTxt问答等候语String--
systemName系统编码String--
robotCss机器人在视口中的位置object-left: "10px", bottom: "10px"
placement问答弹窗位置Stringleft/right/top/bottom/top-start/top-end/bottom-start/bottom-endtop-end
useAudio语音功能Booleantrue/falsetrue
space监听时间间隔Number-3000
mode交互模式Stringtext/audiotext
openInstruct是否开启指令控制Booleantrue/falsetrue
qaServer问答服务地址String--
audioServer语音服务地址String--
wsServer语音监听地址String--
instructWs指令监听地址String--
eventFun触发事件Array--

eventFun

参数说明类型可选值默认值
keywords触发关键字Array--
trigger回调触发时机Stringafter/together-
fun触发的回调函数Function--

方法

参数说明参数
searchText问答接口接收一个参数:{searchText} 问题的字符串
startMonitorAudio开启语音监听-
uploadWavFile语音转文字接口接收一个参数(formData类型):{modelName,audio} modelName:语音模型(tiny/base/small/medium/large), audio:语音文件流

Slot

参数说明
reference触发问答弹窗显示的HTML元素
0.1.33

12 months ago

0.1.30

12 months ago

0.1.31

12 months ago

0.1.32

12 months ago

0.1.29

12 months ago

0.1.28

12 months ago

0.1.27

1 year ago

0.1.26

1 year ago

0.1.24

1 year ago

0.1.25

1 year ago

0.1.23

1 year ago

0.1.20

1 year ago

0.1.21

1 year ago

0.1.22

1 year ago

0.1.19

1 year ago

0.1.18

1 year ago

0.1.17

1 year ago

0.1.16

1 year ago

0.1.15

1 year ago

0.1.14

1 year ago

0.1.13

1 year ago

0.1.12

1 year ago

0.1.11

1 year ago

0.1.10

1 year ago

0.1.9

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago