chatopera / clause Goto Github PK
View Code? Open in Web Editor NEW:horse_racing: 聊天机器人,自然语言理解,语义理解
Home Page: https://bot.chatopera.com
License: Other
:horse_racing: 聊天机器人,自然语言理解,语义理解
Home Page: https://bot.chatopera.com
License: Other
root@jydatatop-virtual-machine:/soft/clause# cmake ../..
CMake Error: The source directory "/" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
root@jydatatop-virtual-machine:/soft/clause# make
make: *** 没有指明目标并且找不到 makefile。 停止。
root@jydatatop-virtual-machine:/soft/clause#
@ANY
代表任何字符串,但是 @ANY
的slot不能进入utterance
服务端是linux,使用docker部署了clause,启动显示正常。
在windows上,使用vscode运行 clause-py-demo 工程,报错如下:
“UnicodeDecodeError: 'gbk' codec can't decode byte 0x85 in position 190: illegal multibyte sequence”
把with open(os.path.join(curdir, "profile.json"), 'r') as f: 中的'r'改成‘rb’后编码的问题解决,又报以下问题:
[connect] clause host 172.16.1.103, port 8056
[clean_up_bot] remove intent take_out
[create] dict name food
[create] dict name phoneNumber
[create] intent name take_out
[create] intent slot time
[create] intent slot loc
[create] intent slot food
[create] intent slot phone
[create] intent utter 我想订一份{food}
[create] intent utter 我想点外卖
[create] intent utter 我想点一份外卖,{time}用餐
[create] intent utter 我想点一份{food},送到{loc}
[train] start to train bot ...
[train] error Data(rc=None, error=None, msg=None, id=None, chatbotID=None, customdicts=None, sysdicts=None, botsysdicts=None, dictwords=None, customdict=None, sysdict=None, botsysdict=None, dictword=None, dictpattern=None, patterncheck=None, patternchecks=None, intents=None, slots=None, utters=None, intent=None, slot=None, utter=None, devvers=None, provers=None, devver=None, prover=None, sessions=None, messages=None, session=None, message=None, currpage=None, totalpage=None, totalrows=None, pagesize=None, page=None, query=None)
Traceback (most recent call last):
File "f:/study/clause-py-demo/bot.py", line 169, in
raise Exception("Unexpected response with training bot request.")
Exception: Unexpected response with training bot request.
在 clause server服务内运行 docker-compose logs -f 查看日志,发现以下内容:
clause_1 | SELECT id, description, createdate, updatedate from cl_intents WHERE chatbotID ='bot007' and name = 'take_out'
clause_1 | ---
clause_1 | I0927 10:15:54.910068 36 maf.hpp:137] getDictDetailByChatbotIDAndName name: @time, chatbotID: @Builtin, isBuiltin: 1
clause_1 | I0927 10:15:54.910094 36 maf.hpp:151] getDictDetailByChatbotIDAndName execute SQL:
clause_1 | ---
clause_1 | SELECT id, name, chatbotID, description, createdate, updatedate, samples, type, vendor, builtin, active from cl_dicts WHERE name ='@time' and chatbotID = '@Builtin'
clause_1 | ---
clause_1 | I0927 10:15:54.910348 36 handler.cpp:3259] # ERR: SQLException in /home/hain/git/clause/src/clause/src/handler.cpp
clause_1 | I0927 10:15:54.910369 36 handler.cpp:3261] # ERR: Unknown column 'type' in 'field list'
使用python多进程调用服务器上启动的服务,session = bot.putSession,报AttributeError: 'NoneType' object has no attribute 'id',thrift.transport.TTransport.TTransportException: TSocket read 0 bytes的错误,代码如下:
def print_time(j):
bot = Client("xxx.xx.xxx.xxx", "xxxx")
chatbotID = "123"
text = "今天天气"
print("[chat] human: %s" % text)
session = bot.putSession(Data(session=ChatSession(chatbotID=chatbotID,
uid=f"py{j}",
channel="testclient",
branch="dev"
))).session
resp = bot.chat(Data(session=ChatSession(id=session.id), message=ChatMessage(textMessage=text)))
if resp.session.resolved:
intent_name = resp.session.intent_name
print("意图的名字是:", intent_name)
for i in resp.session.entities:
print("词槽的名称是:", i)
else:
print("[错误] 返回不符合逻辑")
bot.destroy()
for j in range(5):
t = threading.Thread(target=print_time, args=(j,))
t.start()
Chatopera 云服务,https://docs.chatopera.com/,一站式上线智能对话机器人服务。
快速上线知识库、任务型对话机器人、和业务系统集成,提升企业业务流程自动化!
查询票价时,始发站和目的站因为用的是同一个词典词槽,导致在会话时,只要输入一次车站名,就填满了两个槽位,这个怎么办???
部署clause服务时
Digest: sha256:b15cf21b66c6a4e98e78aa458fa56caf43b5338b3d5710326c2666ee265a83c6
Status: Downloaded newer image for chatopera/activemq:5.14.3
Pulling intent (chatopera/intent:develop)...
到这里又不动了,是不是没有放出来,或者咱们的访问有限制?
您好,如何实现一些礼貌用语的意图,
比如,谢谢,你好,您好等。
说是可以修改,停用词列表,停用词配置文件在哪里,如何修改?
从redis查不到版本信息,抛出的异常没有处理。
在intent和clause中,删除paddle。
postCustomDict result: {"rc":1,"error":"Invalid params, customdict obj is required.","msg":null,"id":null,"chatbotID":null,"customdicts":null,"sysdicts":null,"botsysdicts":null,"dictwords":null,"customdict":null,"sysdict":null,"botsysdict":null,"dictword":null,"intents":null,"slots":null,"utters":null,"intent":null,"slot":null,"utter":null,"devvers":null,"provers":null,"devver":null,"prover":null,"sessions":null,"messages":null,"session":null,"message":null,"currpage":null,"totalpage":null,"totalrows":null,"pagesize":null,"page":null,"query":null} +0ms
在node.js使用中 报错 使用官方的测试成功
下载 clause-osc之后 进入admin/docker 执行 ./start.sh
报错:clauseosc_sysdicts_1 exited with code 132
单独启动显示
root@075cd2541a79:/app# ./sysdicts_server "--flagfile=/config/cmd.flags"
Illegal instruction (core dumped)
导致:
clause_1 | Thrift: Mon May 11 14:37:27 2020 TSocket::open() getaddrinfo() <Host: sysdicts Port: 8066>Name or service not known
clause_1 | I0511 14:37:27.393725 1 client.cpp:47] sysdicts init exception: Could not resolve host for client socket.
clause_1 | I0511 14:37:27.393741 1 handler.cpp:120] Init fails, exception in Sysdicts.
clause_1 | F0511 14:37:27.393748 1 main.cpp:67] Check failed: handler->init() [Fatal Error] Serving Handler fails to init.
报错
通过 docker-compose ps 查看
chatopera/sysdicts:develop "/app/sysdicts_ser..." About a minute ago Restarting (132) 32 seconds ago
redis,mq,mysql,intend 服务启动正常
Docker version 17.06.2-ce, build cec0b72
docker-compose version 1.15.0, build e12f3b9
操作系统信息:
Linux version 3.10.0-693.el7.x86_64 ([email protected]) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) ) #1 SMP Tue Aug 22 21:09:27 UTC 2017
CentOS Linux release 7.4.1708 (Core)
gcc 信息:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC)
发布版本,打包。
增加服务启动,清数据,服务停止等脚本。
发布部署安装包,提交到 Github Branch.
在应用初始化阶段,有可能同时建立MySQL的数据库,这时初始化需要一段时间,大约20秒,在 Clause模块中,加入等待的逻辑。
您好,在部署过程中遇到了部署均衡的问题,请问如何配置clause的注册中心信息?谢谢!
ubuntu:~/clause/build/debug$ make
[ 32%] Building CXX object src/clause/CMakeFiles/clause_server.dir/serving/server_constants.cpp.o
[ 33%] Building CXX object src/clause/CMakeFiles/clause_server.dir/serving/server_types.cpp.o
make[2]: *** No rule to make target '../../lib/libthriftnb.so', needed by 'src/clause/clause_server'. Stop.
CMakeFiles/Makefile2:347: recipe for target 'src/clause/CMakeFiles/clause_server.dir/all' failed
make[1]: *** [src/clause/CMakeFiles/clause_server.dir/all] Error 2
Makefile:90: recipe for target 'all' failed
环境:ubuntu 18.04,使用官方脚本并执行sudo apt-get install libevent-dev
命令:
~/git/clause/bin/thrift --gen php -o . ../thrift/server.dsl
~/git/clause/bin/thrift --gen js:node -o . ../thrift/server.dsl
~/git/clause/bin/thrift --gen cpp -o . ../thrift/server.dsl
~/git/clause/bin/thrift --gen csharp -o . ../thrift/server.dsl
~/git/clause/bin/thrift --gen py -o . ../thrift/server.dsl
~/git/clause/bin/thrift --gen java -o . ../thrift/server.dsl
检查 Wiki 文档中 Install, Compile 是否可用。
提交公司信息说明后优先处理解决!
root@128bb1f63e75:/data# ls
LICENSE README.md assets bot.py docker-compose.yml profile.json requirements.txt sample.env scripts var
root@128bb1f63e75:/data# python bot.py
[connect] clause host clause, port 8056
[create] dict name food
[create] dict name phoneNumber
[create] intent name take_out
[create] intent slot time
[create] intent slot loc
[create] intent slot food
[create] intent slot phone
[create] intent utter 我想订一份{food}
[create] intent utter 我想点外卖
[create] intent utter 我想点一份外卖,{time}用餐
[create] intent utter 我想点一份{food},送到{loc}
[train] start to train bot ...
[train] in progress ...
[train] in progress ...
[train] in progress ...
[train] in progress ...
[train] in progress ...
[train] in progress ...
[train] in progress ...
[train] in progress ...
[train] in progress ...
[train] in progress ...
[train] in progress ...
[train] in progress ...
[train] in progress ...
[train] in progress ...
[train] in progress ...
[train] in progress ...
[train] in progress ...
[train] in progress ...
[train] in progress ...
[train] in progress ...
[train] in progress ...
[train] in progress ...
[train] in progress ...
[train] in progress ...
[train] in progress ...
[train] in progress ...
......
如示例截屏所示,模型应该能很快训练完成
No
git rev-parse HEAD
)Collecting clause
Using cached https://files.pythonhosted.org/packages/15/01/603f7a3d8711c514c4fc6e150b282fc94d4791e76c84b6048dd2e5940bb1/clause-1.1.5.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-build-t3euV0/clause/setup.py", line 3, in
from clause import version
File "clause/init.py", line 19, in
from .gen.clause import ttypes, constants, Serving
File "clause/gen/clause/ttypes.py", line 21
SyntaxError: Non-ASCII character '\xe5' in file clause/gen/clause/ttypes.py on line 22, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-t3euV0/clause/
提交公司信息说明后优先处理解决!
https://www.chatopera.com/mail.html
* 定制化开发
* 插件
* 培训
……
git rev-parse HEAD
)今天,输入“点外卖”进行测试时,又发生这个错误:org.apache.thrift.transport.TTransportException
您好?
开源语义理解引擎有相关api文档吗!?
比如,语义理解有哪些接口或方法?
返回的正确 /错误代码有哪些?如rc:0, msg:train job is dispatched.
系统词典,有哪些等等?
001.corretto-jdk.sh中的:wget --no-check-certificate -O $JDKNAME https://static-public.chatopera.com/vendors/java/java-1.8.0-amazon-corretto-jdk_8.212.04-2_amd64.deb,会出现HTTP request sent, awaiting response... 404 Not Found。
同理,001.nodejs.sh的NODEPKG=https://nodejs.org/download/release/latest-v10.x/node-v10.22.1-linux-x64.tar.gz,也是没找到这个版本。
使得无法安装。如何处理呢
如果想训练知识库,应该如何配置,是在profile.json里配置吗,谢谢
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.