Adam
Adam

Reputation: 3013

Dialogflow minimal viable product

I am trying to create the bare minimum of a chatbot with dialogflow in an Android app. Initially I do not need the bot to hook into things or have context and entities. I just want it to match questions with answers as good as it can.

I do not come from the web world so this https://dialogflow.com/docs/getting-started/basic-fulfillment-conversation confuses me. The final part of the tutorial is not finished and it leaves me hanging a bit.

As an Android dev I want the app to:

call a rest api with the user text

or possibly:

invoke an SDK and have a local pretrained agent and not involve the internet an all

You can download the Agent but that is just some json files. I found an Dialogflow.SDK but it seems to be related to speech. In the dialog flow console you can 'copy curl':

curl 'https://api.dialogflow.com/v1/query?v=20170712&query=Hi&lang=en&sessionId=xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx' -H 'Authorization:Bearer xxxxxxxxxxxxxxxxxxxxxxxxx'

I want to access the agent like that from multiple instances of an app.

Do you always need a 'fulfillment'?

The guide mentions creating folders on your local machine(in conjunction with fulfillment) are these only used to do a 'deploy' from your local machine to configure the web hook in the cloud? Or are they also used to deploy the entire Agent to the cloud project? (which i can't seem to find any instructions for, unless it's the same as for webhooks?)

gcloud beta functions deploy weatherWebhook --stage-bucket [BUCKET_NAME] --trigger-http

I have read questions with both tags DialogFlow and Android but most of them seem to involve Google Android Assistent which I have no interest in.

Upvotes: 0

Views: 218

Answers (1)

Prisoner
Prisoner

Reputation: 50741

You do not need fulfillment. This is primarily for Dialogflow to take advanced actions or to use more complicated logic to handle the response.

You also cannot run Dialogflow processing on your device - all operations take place in the cloud. So you don't need to download the zip file unless you want to make a backup copy of your agent.

The REST interface you're looking for is the one you found. It handles more than speech - the /query endpoint can take a query parameter which contains "Natural language text to be processed."

Upvotes: 1

Related Questions