New:Socket for Asana Is Now Available.Learn more
Get Started

g-ai-robot

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

g-ai-robot

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

latest
npmnpm
Version
0.1.33
Version published
Weekly downloads
53
1666.67%
Maintainers
1
Weekly downloads
 
Created
Source

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元素

FAQs

Package last updated on 26 Aug 2024

Related posts