Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
src
README.md
pom.xml

README.md

Maven Central

Dialogflow

The DIALOGFLOW UDF uses Google Dialogflow for building virtual assistants, intelligent chatbots, and other types of conversational interfaces.

Prerequisites

  • 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

Configuration

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

Installation

Download the JAR from Maven Central and copy it to the KSQL extension directory (see here for more details).

Example usage

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?'

The above example uses a prebuilt room booking agent. You can checkout other prebuild agents here, or train your own agent.

You can’t perform that action at this time.