Chatopera开发者平台:809987971, 点击链接加入群聊
企业聊天机器人-Java 端示例程序
本教程介绍如何使用 Chatopera 机器人开发者平台的 Java SDK 与机器人进行集成,阅读本教程需要 20 分钟时间。
参考系统集成#快速开始,并完成注册账号
-创建机器人
-导入知识库文件
-获取ClientId和Secret
几个步骤。
git clone https://github.com/chatopera/chatopera-sample-java.git
cd chatopera-sample-java/app
mvn install
在完成如上步骤后,修改程序的配置文件,使用文本编辑器打开src/main/resources/sample.properties
,并设置如下内容:
chatbot.clientId=机器人的ClientId
chatbot.secret=机器人的Secret
然后执行命令
cd chatopera-sample-java/app
mvn clean compile exec:java -Dexec.mainClass="com.chatopera.bot.sample.App"
可以看到控制台打印从知识库获得的回复,程序执行完毕,以上。
关于项目配置,机器人的 Java 接口等更多细节,请参考开发者文档。
Copyright (2018) 北京华夏春松科技有限公司
Copyright 2018-2020, 北京华夏春松科技有限公司. All rights reserved. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。