DIALOGFLOW UDF uses Google Dialogflow for building virtual assistants, intelligent chatbots, and other types of conversational interfaces.
- Follow the official getting started steps to signup for a Dialogflow account and create a Dialogflow agent
- Download the private key (JSON) for your Dialogflow service account. You will need this when configuring the UDF
The following configs should be added to your KSQL server.properties file.
ksql.functions.dialogflow.credentials.file: a path to the file containing your GCP service account credentials
ksql.functions.dialogflow.project.id: the GCP project ID
ksql.functions.dialogflow.language.code: the language that should be used for conversations. see supported languages
SELECT DIALOGFLOW(text, sessionId) FROM SOME_STREAM ; # sample input: DIALOGFLOW('I would like to book a room', 'user2') sample output: 'I can help with that. Where would you like to reserve a room?'