选择Echo bot template,使用composer(mac上的1.0.0版安装表单DMG)创建一个bot
从当前回购中克隆回显技能样本: https://github.com/microsoft/BotBuilder-Samples/tree/master/samples/python/80.skills-simple-bot-to-bot
在本地运行该技能
图中的端点是端口3980,但在最后一次尝试中,主bot是由编写器在当前bot上提供服务的。关键是我将回调URL设置为运行主bot的URL
我在技术方面消除了一个错误。在调试该技能之后,我发现问题出在回调上,回调将404错误返回给发送活动时的技能
uring handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/victorvasiliev/PycharmProjects/BotBuilder-Samples/samples/python/80.skills-simple-bot-to-bot/echo-skill-bot/adapter_with_error_handler.py", line 71, in _send_eoc_to_parent
await turn_context.send_activity(end_of_conversation)
File "/usr/local/lib/python3.7/site-packages/botbuilder/core/turn_context.py", line 170, in send_activity
result = await self.send_activities([activity_or_text])
File "/usr/local/lib/python3.7/site-packages/botbuilder/core/turn_context.py", line 217, in send_activities
return await self._emit(self._on_send_activities, output, logic())
File "/usr/local/lib/python3.7/site-packages/botbuilder/core/turn_context.py", line 295, in _emit
return await logic
File "/usr/local/lib/python3.7/site-packages/botbuilder/core/turn_context.py", line 212, in logic
responses = await self.adapter.send_activities(self, output)
File "/usr/local/lib/python3.7/site-packages/botbuilder/core/bot_framework_adapter.py", line 686, in send_activities
raise error
File "/usr/local/lib/python3.7/site-packages/botbuilder/core/bot_framework_adapter.py", line 672, in send_activities
activity.conversation.id, activity.reply_to_id, activity
File "/usr/local/lib/python3.7/site-packages/botframework/connector/aio/operations_async/_conversations_operations_async.py", line 533, in reply_to_activity
raise models.ErrorResponseException(self._deserialize, response)
botbuilder.schema._models_py3.ErrorResponseException: Operation returned an invalid status code 'Not Found'
有人面临过同样的问题吗
您可以在documentation中看到,您的技能宿主端点需要以
api/skills
结束,而不仅仅是api
:技能主机端点用作发送给技能的活动中的服务URL,这意味着它将是技能调用的任何对话API方法的基础URI。如果你的技能试图向一个不存在的URL发送请求,那么你应该得到404。Composer bot将把请求路由到以
api/skills
开头的路由,所以这就是您应该放在服务URL中的内容相关问题 更多 >
编程相关推荐