我正在和watson一起做一个简单的聊天机器人。我有一个python脚本。为了简单起见,假设脚本是这样的:
x=5
x在watson中,我想要返回:
result is 5但是,我不确定如何与python交互。我的研究表明它与NodeJS和JSON有关,但我找不到任何适合我需求的示例或教程。
有人能告诉我我应该采取什么行动或任何文档吗?
发布于 2018-04-30 04:04:52
Watson Assistant和客户端(应用程序)之间的数据交换为JSON格式的数据。服务本身有一个REST API,您可以通过任何编程语言或命令行工具使用它。For Python, there is even a SDK。
有一些用Python编写的示例。我推荐我自己的代码:)。这就是a tool I wrote to interact with Watson Assistant / Watson Conversation (blog entry is here)。另一个Python sample is what I called EgoBot (blog is here)。它展示了如何在聊天机器人中更改对话框本身。基本上,你可以让机器人学习一些东西。这些示例应该可以帮助您入门。
https://stackoverflow.com/questions/50090438
复制相似问题