Hi,
thanks for your reply.
I did try, I pip install the Apiaa, I imported it and I replace this bit:
- " text = update["message"]["text"]
chat_id = update["message"]["chat"]["id"]
bot.sendMessage(chat_id, "From the web: you said '{}'".format(text))
return "OK""
with this bit:
- # prepare API.ai request
req = ai.text_request()
req.lang = 'en' # optional, default value equal 'en'
req.query = message
# get response from API.ai
api_response = req.getresponse()
responsestr = api_response.read().decode('utf-8')
response_obj = json.loads(responsestr)
if 'result' in response_obj:
response = response_obj["result"]["fulfillment"]["speech"]
reply(sender, response)"
I just ended up with many errors in the console.
I do am a beginner so I was going along to see what I need to fix, but If you or somebody on the forum dealt with this kind of issue or saw a way to make it work, it would be great.
Thanks