Skip to content

Commit

Permalink
Enable upload faqs to Chatopera with a config file in OSSChat (#187)
Browse files Browse the repository at this point in the history
* #153 add test profile

* #153 Add demo repo and upgrade chatopera plugin for mapping bot per project

* #153 Add demo repo and upgrade chatopera plugin for mapping bot per project

* 0.10.34

* 0.10.35

* #153 enable a single bot per github owner with star

* 0.10.36

* 0.10.38

* #175 import Bot FAQ on starting

* 0.10.39

* 0.10.40

* #175 resolve __dirname

* #175 fix default config

* add BJ NodeJS Club

Co-authored-by: mukaiu <[email protected]>
  • Loading branch information
Hai Liang Wang and mukaiu authored Nov 1, 2021
1 parent fea7be0 commit a3a1f31
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 1 deletion.
16 changes: 16 additions & 0 deletions faqs/chatopera.faqs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
chatopera/*:
简单的介绍下这个开源项目吧?:
answers:
- 春松客服是面向中小型企业的智能客服系统。现有提供的功能可以参考我们的 README.md 文件。https://github.com/chatopera/cskefu/ 我们强调的智能客服主要是机器人客服以及辅助客服人员的一些功能。语音识别模块,以及我们已经发布的多轮对话设计器、智能问答引擎,很快会集成到春松客服中。 适用场景包括售前、对话营销。
多轮对话设计器、智能问答引擎,这两个集成后是开源的吗,还是付费使用?:
answers:
- 多轮对话设计器可以免费下载使用, 智能问答引擎还没有开源。参考Chatopera 云服务。
请问客户怎么接入?:
answers:
- 部署安装,配置使用。创建网站渠道,查看网站渠道详情有集成指南。
软件怎么收费?:
answers:
- 基础模块不收费,商业插件和服务收费。参考开源项目地址主页介绍。
春松客服支持哪些渠道?:
answers:
- 免费模块目前支持 PC,Mobile 浏览器,开源版本就可以。APP 需要对接 SDK,这个有额外的开发工作,我们可以定制开发。
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"rx-queue": "^0.12.6",
"smee-client": "^1.2.2",
"wechaty": "^0.73.9",
"wechaty-chatopera": "^0.3.11",
"wechaty-chatopera": "0.4.2",
"wechaty-ducks-contrib": "^0.3.6",
"wechaty-plugin-contrib": "^0.15.10",
"wechaty-puppet-padlocal": "^0.4.2",
Expand Down
16 changes: 16 additions & 0 deletions src/config-projects/bj-nodejs-club.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* Project: node-party
* GitHub: https://github.com/bj-nodejs-club/node-party
* Maintainer: Chatopera https://github.com/hailiang-wang
*
*/

import type { RepoConfig } from './config.js'
export const config: RepoConfig = {

'bj-nodejs-club/node-party': [
/* BJ NodeJS Club */ '899322744@chatroom',
],
}

export default config
2 changes: 2 additions & 0 deletions src/config-projects/mod.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import apache from './apache.js'
import authing from './authing.js'
import baidu from './baidu.js'
import bjNodejsClube from './bj-nodejs-club.js'
import chatopera from './chatopera.js'
import hailiangWang from './hailiang-wang.js'
import kaiyuanshe from './kaiyuanshe.js'
Expand Down Expand Up @@ -34,6 +35,7 @@ export const projectsRepoConfig = {
...webank,
...wechaty,
...zixia,
...bjNodejsClube,
...chatopera,
...hailiangWang,

Expand Down
10 changes: 10 additions & 0 deletions src/plugins/chatopera.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,26 @@ import {
projectsRepoConfig,
} from '../config-projects/mod.js'

import {
fileURLToPath,
} from 'url'

import path from 'path'

let plugin: undefined | WechatyPlugin

// Auto load Wechaty Chatopera Plugin with ENV variables
if (
(process.env['CHATOPERA_DEFAULT_CLIENTID'] && process.env['CHATOPERA_DEFAULT_SECRET'])
|| process.env['CHATOPERA_PERSONAL_ACC_TOKEN']
) {

const __dirname = path.dirname(fileURLToPath(import.meta.url))

plugin = WechatyChatopera({
clientId: process.env['CHATOPERA_DEFAULT_CLIENTID'],
faqBestReplyThreshold: process.env['CHATOPERA_FAQ_BESTREPLY_THRES'] ? parseFloat(process.env['CHATOPERA_FAQ_BESTREPLY_THRES']) : undefined,
faqPath: path.join(__dirname, '../../../faqs'),
faqSuggReplyThreshold: process.env['CHATOPERA_FAQ_SUGGREPLY_THRES'] ? parseFloat(process.env['CHATOPERA_FAQ_SUGGREPLY_THRES']) : undefined,
mention: false,
personalAccessToken: process.env['CHATOPERA_PERSONAL_ACC_TOKEN'],
Expand Down

0 comments on commit a3a1f31

Please sign in to comment.