We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It's only returning a single-line response. I made a change in the code to return multiple lines but without buttons
Original Code - rasa_flask_router.py:
def send_to_bot(sender, message): data = { 'sender': sender, 'message': message } headers = {"Content-Type": "application/json", "Accept": "application/json"} r = requests.post(f'{rasa_url}/webhooks/rest/webhook', json=data, headers=headers) return r.json()[0]['text']
My Code:
def send_to_bot(sender, message): data = { 'sender': sender, 'message': message } headers = {"Content-Type": "application/json", "Accept": "application/json"} r = requests.post(f'{rasa_url}/webhooks/rest/webhook', json=data, headers=headers) print(r.text) resposta = json.loads(r.text) #print(resposta) resposta_final = '' for x in resposta: for y in x.keys(): if y != 'text': continue resposta_final += (x['text']) + '\n' print(resposta_final) return resposta_final
The text was updated successfully, but these errors were encountered:
No branches or pull requests
It's only returning a single-line response. I made a change in the code to return multiple lines but without buttons
Original Code - rasa_flask_router.py:
My Code:
The text was updated successfully, but these errors were encountered: