Skip to content

Links to all Dialogflow libraries and samples

License

Notifications You must be signed in to change notification settings

JeremyJi10/resources

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dialogflow libraries and samples

Dialogflow's APIs allow you to take action on your own systems based on conversational input, embed your conversational interface into your app or website, and dynamically change your agent's behavior. Dialogflow APIs center around three primary use cases:

  • Fulfillment: take action on your own systems based on conversational input. You can do things like querying a database or API to provide info to your users with any integration (Actions on Google, Slack, etc.)
  • Detect Intent API: Embed your conversational interface built with Dialogflow into your app, website or device. Call this API with a user's query to get back how your DIalogflow agent's response
  • Agent API: Dynamically change your agent's behavior by editing your agent's intents, entities and contexts. Do anything you can through Dialogflow console programmatically with Dialogflow's agent APIs.

Fulfillment

Fulfillment is code that's deployed as a webhook that lets your Dialogflow agent call business logic on an intent-by-intent basis. During a conversation, fulfillment allows you to use the information extracted by Dialogflow's natural language processing to generate dynamic responses or trigger actions on your back-end.

Most Dialogflow agents make use of fulfillment to do things like: generate dynamic responses based on information looked up from a database, place orders based on products a customer has asked for, implement the rules and winning conditions for a game.

Library

Platform Package Manager Quick Start Getting Started
Node.js npm Quick Start Guide Getting Started Guide

Note: For all other platforms please see API reference for a webhook request and response.

Samples

Name Description
Node.js
Actions on Google Sample demonstrating how to use both the Dialogflow fulfillment library and the Actions on Google client library together.
Bike Shop Dive into making a agent for a small business like this appointment scheudling bike shop
FAQ Description: Sample desmonstrating how to use Knowledge Connectors, the Telephony Gateway and Actions on Google together.
Firestore Sample demonstrating how to connect a Dialogflow agent to Firebase's Firestore database.
Human-agent Handoff This sample consists of a simple API.AI agent, a node.js server and a web interface that together demonstrate an approach for handing text-based conversations from an API.AI agent to a human operator."
Import A simple sample showing how to use Dialogflow's Importer for Alexa Skills to import a Alexa Skill to Dialogflow and deploy it to the Google Assistant."
Multi locale/language Create and fulfill a multilignual and multilocale agent with this French and English speaking sample
Quick Start Get started quickly with fulfillment with this basic code
Regular expression entity validation. Sample demonstrating how to validate a entity with a regular expression in fulfillment.
Temperature Converter Trivia Learn how intent, entities, contexts and rich responses work with this sample that converts temperatures with trivia along the way Temperature Converter Trivia
Weather Make a API call from fulfillment to give user's relevant information like the weather Weather
Python/Flask
Translate Get information from the user in the form of Dialogflow parameters and make an API call with the data to translate user's speech from one language to another
Weather Make a API call from fulfillment to give user's relevant information like the weather
JSON
Webhook Request & Response This sample shows Dialogflow's fulfillment webhook JSON requests and responses for v1 & v2 agents, including Actions on Google-specific requests & resposnes"

Actions on Google

Actions on Google has created a library and samples specifically for use with Dialogflow and Actions on Google together. These tools and samples do not work with any other Dialogflow integrations.

Library

If you are only interested in building Dialogflow fulfillment for the Google Assistant and don't plan on using other integrations, you should use the Actions on Google fulfillment library which supports all Actions on Google features.

Samples

For fulfillment samples specific to Google Assistant please see Actions on Google's Dialogflow sample page

Detect Intent and Agent APIs

Dialogflow's detect intent API is a great way to integrate your Dialogflow agent into your website or app. The detect intent API enables you to query your agent with a user's request (audio or text) and receive your agent's response to the user's request.

The agent API allows you to dynamically change the behavior of your Dialogflow agent by allowing you to create, read, update and delete intents, entities and contexts. Both the detect intent and agent APIs can be accessed through Dialogflow's REST API or the client libraries available for Node.js, Python, Java, Go, Ruby, C#, and PHP listed below:

API V2

Libraries

Platform Package Manager Installation Include/Import
Node.js NPM npm install dialogflow const dialogflow = require('dialogflow');
Python PyPI pip install dialogflow import dialogflow
Java Maven See Quickstart import com.google.cloud.dialogflow.V2.*;
Go go get go get cloud.google.com/go/dialogflow/apiv2 import "cloud.google.com/go/dialogflow/apiv2"
Ruby Gem gem install api-ai-ruby ApiAiRuby::Client.new(...)
C# Nuget nuget install Google.Cloud.Dialogflow.V2 using Google.Cloud.Dialogflow.V2;
PHP Packagist composer require google/cloud-dialogflow use Google\Cloud\Dialogflow\V2\AgentsClient;

Samples

Platform Samples
Node.js https://github.com/googleapis/nodejs-dialogflow/tree/master/samples
Python https://github.com/googleapis/dialogflow-python-client-v2/tree/master/samples
Java https://github.com/GoogleCloudPlatform/java-docs-samples/tree/master/dialogflow/cloud-client
Go https://github.com/GoogleCloudPlatform/google-cloud-go/tree/master/dialogflow/apiv2
C# https://github.com/googleapis/google-cloud-dotnet/tree/master/apis/Google.Cloud.Dialogflow.V2/Google.Cloud.Dialogflow.V2.Snippets
PHP https://github.com/GoogleCloudPlatform/php-docs-samples/tree/master/dialogflow
Ruby https://github.com/GoogleCloudPlatform/ruby-docs-samples/tree/master/dialogflow

API V2 BETA

Dialogflow's V2beta1 offers new features that are not yet available on the generally available and may make some backwards incompatible changes.

Libraries

Platform Package Manager Installation Include/Import
Node.js npm npm install dialogflow const dialogflow = require('dialogflow').V2beta1;
Python PyPi pip install dialogflow import dialogflow_V2beta1
Java Maven See Quickstart import com.google.cloud.dialogflow.V2beta1.*;

Samples

Platform Samples
Python https://github.com/googleapis/dialogflow-python-client-v2/tree/master/samples
Java https://github.com/GoogleCloudPlatform/java-docs-samples/tree/master/dialogflow/cloud-client
Node.js https://github.com/googleapis/nodejs-dialogflow/tree/master/samples

API V1 (Legacy)

Libraries

Dialogflow's legacy V1 SDKs can be found below. When starting a new project, use Dialogflow V2 and V2 SDKs listed above.

Platform Docs
Android SDK Android SDK Docs
Botkit SDK Botkit SDK Docs
C++ C++ Docs
Cordova SDK Cordova SDK Docs
HTML + JS Example
iOS SDK iOS SDK Docs
Java SDK Java SDK Docs
JavaScript SDK JavaScript SDK Docs
.NET (WP8, W10) .NET SDK Docs
Node.js SDK Node.js SDK Docs
Python SDK Python SDK Docs
Ruby SDK Ruby SDK Docs
Unity SDK Unity SDK Docs
Xamarin SDK Xamarin SDK Docs

About

Links to all Dialogflow libraries and samples

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published