【发布时间】:2017-04-02 01:11:02
【问题描述】:
我最近在 python 中玩弄 wit.ai。在与机器人通信时,我已经能够使 .interactive() 工作,但我真的希望 .message() 工作,因为我想一次发送一条消息。我在网上看到可以这样操作:
client = Wit(access_token=token, actions=actions)
resp = client.message('hello')
print(resp)
但是,响应不是我想要的,实际上只是发送到服务器的消息。像这样:
{'msg_id': '516ffc83-f008-446a-979a-2da2207164a1', '_text': 'hello', 'entities': {'intent': [{'confidence': 0.9646306495169545, 'value': 'greeting'}]}}
我想从消息中获取回调并打印出来。 谢谢!
【问题讨论】: