Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Dialogflow API Java examples

These samples demonstrate the use of the Dialogflow API.

These samples show how to detect intents with text, audio, and streaming audio.

These samples show how to manage contexts, entities, entity types, and intents

Java Version

This sample requires you to have Java8.

Download Maven

To get started, download and install it.

Setup

  • Create a project with the Google Cloud Console, and enable the Dialogflow API.

  • Set up authentication. For example, from the Cloud Console, create a service account, download its json credentials file, then set the appropriate environment variable:

    export GOOGLE_CLOUD_PROJECT=PROJECT_ID
    export GOOGLE_APPLICATION_CREDENTIALS=/path/to/your-project-credentials.json
  • Set PROJECT_ID in pom.xml to your Google Cloud Project Id.

  • Set SESSION_ID in pom.xml to a session name of your choice. (Defaults to SESSION_ID)

  • Set CONTEXT_ID in pom.xml to a context name of your choice. (Defaults to CONTEXT_ID)

Run the Tests

To verify the API's are enabled, run the unit tests via

mvn clean verify