0

Does anyone have a working example of code for a dialogflow bot where the user can switch from an english Facebook bot to a french one?

EDIT: Ideally the bot would initially engage in english then would prompt the user to select a language as the first intent. Then would switch over to the other language. Is there a way to do this? Do I have to reinitiate an instance of dialogflow(api.ai) body with the updated lang variable? Or can I send response with "lang" in the json to switch?

  • 1
    Are you trying to switch between languages during one conversation? – Wayne Piekarski Oct 24 '17 at 01:27
  • Yes -- ideally the bot would initially engage in english then would prompt the user to select a language as the first intent. Then would switch over to the other language. Is there a way to do this? Do I have to reinitiate an instance of dialogflow(api.ai) body with the updated lang variable? Or can I send response with "lang" in the json to switch? – Katie Temrowski Oct 26 '17 at 20:51
  • I know with Actions on Google that it is not possible to change languages mid-conversation, it is specified in the Google Assistant settings per user. Not sure about Dialogflow for other platforms. – Wayne Piekarski Oct 27 '17 at 00:52
  • Wouldn't you just change the `lang` property in the request to /query? https://dialogflow.com/docs/reference/agent/query – Sam H. Nov 08 '17 at 07:47

0 Answers0