Chinese-NLP-book / rasa_chinese_book_code

《Rasa实战:构建开源对话机器人》官方随书代码 | The official source code of Rasa in Action: Building Open Source Conversational AI
https://item.jd.com/13624358.html
317 stars 112 forks source link

webapi使用 #10

Open Baiyshen opened 1 year ago

Baiyshen commented 1 year ago

第五章,查询天气,

如果使用webapi怎么请求呢, 第一步:发送: http://localhost:5005/conversations/0/messages {   "sender": "user",   "text": "上海的天气怎么样" }

第二步:调用http://localhost:5005/conversations/0/predict 第三步:取第二步得分最高的action开始执行: http://localhost:5005/conversations/0/execute {   "name": "weather_form" } 得到需要确认日期, 第四步: http://localhost:5005/conversations/0/messages {   "sender": "user",   "text": "明天的" }

到这里之后,slots都有了,怎么触发查询天气呢?