Req = request.get_json(silent=True, force=True) # Flask app should start in global layout If req.get('queryResult').get('action') = 'appointment':Ĭomplete code (without library): import urllib ![]() This is the response I am getting correctly without library:Ĭomplete code (with the library): from dialogflow_fulfillment import WebhookClientįrom flask import Flask, request, Response I need to save all these parameters(entities) in firebase, These output context (only session-vars parameters not other contexts): Or, If I try to do it without a library then how to extract entities(from the session-vars) like (case, name, email, phone). If I try to use the fulfillment library then how to send a response to Dialogflow so that digital human will understand it since "agent.add" doesn't work. So my question is how to accomplish this task successfully? Phone = ('session-vars').get('parameters').get('phone') Name = ('session-vars').get('parameters').get('name')Įmail = ('session-vars').get('parameters').get('email') Now I need to change the whole code for this purpose.Īs I am unable to extract entities using context-based intents (session-vars) like : case = ('session-vars').get('parameters').get('case') ![]() Now the issue is before integrating this chatbot to digital human I wrote the whole code using the fulfillment library. I tried with the fulfillment library (dialogflow_fulfillment) but it was not working so I tried it without a library like : if req.get('queryResult').get('action') = 'appointment': I am trying to send a response to Dialogflow Es using webhook written in python-flask.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |