第五章,查询天气,
如果使用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都有了,怎么触发查询天气呢?
第五章,查询天气,
如果使用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都有了,怎么触发查询天气呢?