• Stars
    star
    119
  • Rank 296,177 (Top 6 %)
  • Language
  • License
    Apache License 2.0
  • Created almost 6 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Links to all Dialogflow libraries and samples

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

More Repositories

1

dialogflow-nodejs-client

Node.js SDK for Dialogflow
JavaScript
658
star
2

dialogflow-fulfillment-nodejs

Dialogflow agent fulfillment library supporting v1&v2, 8 platforms, and text, card, image, suggestion, custom responses
JavaScript
599
star
3

dialogflow-android-client

Android SDK for Dialogflow
Java
575
star
4

dialogflow-python-client

Python library for Dialogflow
Python
556
star
5

dialogflow-javascript-client

JavaScript Web SDK for Dialogflow
TypeScript
412
star
6

dialogflow-apple-client

iOS SDK for Dialogflow
Objective-C
244
star
7

agent-human-handoff-nodejs

A simple Dialogflow agent, a server, and a web interface that shows an approach for handling text-based conversations between a Dialogflow agent and a human operator
JavaScript
211
star
8

fulfillment-webhook-json

Dialogflow's Fulfillment: Webhook JSON (Requests & Responses)
190
star
9

asr-server

FastCGI support for Kaldi ASR
C++
184
star
10

dialogflow-ruby-client

Ruby SDK for Dialogflow
Ruby
141
star
11

selfservicekiosk-audio-streaming

A best practice for streaming audio from a browser microphone to Dialogflow or Google Cloud STT by using websockets.
JavaScript
140
star
12

dialogflow-java-client

Java client library for Dialogflow
Java
133
star
13

fulfillment-weather-nodejs

Integrating an API with Dialogflow's Fulfillment
JavaScript
81
star
14

fulfillment-firestore-nodejs

Integrating Firebase's Firestore database with Dialogflow
JavaScript
81
star
15

fulfillment-bike-shop-nodejs

Integrating Google Calendar API with Dialogflow's Fulfillment & Knowledge Connectors
JavaScript
79
star
16

dialogflow-dotnet-client

.NET framework for Dialogflow
C#
70
star
17

dialogflow-botkit-client

Botkit library for Dialogflow
JavaScript
62
star
18

dialogflow-java-client-v2

Java client for Dialogflow: Design and integrate a conversational user interface into your applications and devices.
59
star
19

dialogflow-unity-client

Unity library for Dialogflow
C#
54
star
20

fulfillment-translate-python

Python
45
star
21

dialogflow-cordova-client

Cordova library for Dialogflow
Objective-C
42
star
22

api-ai-english-asr-model

Api.ai English Speech Recognition (ASR) Model for Kaldi
36
star
23

fulfillment-actions-library-nodejs

Integrating Actions on Google Client Library with Dialogflow's Fulfillment Library
JavaScript
29
star
24

dialogflow-cpp-client

C++ library for Dialogflow
C++
28
star
25

api-ai-cocoa-swift

Cocoa Swift library
Swift
28
star
26

fulfillment-telephony-nodejs

Sample integrating Telephony, Google Sheets, and Slot Filling with Dialogflow
JavaScript
24
star
27

fulfillment-importer-nodejs

Dialogflow's Importer for Alexa Skills to import a Alexa Skill to Dialogflow
JavaScript
22
star
28

fulfillment-slot-filling-nodejs

Slot Filling with Dialogflow Fulfillment
JavaScript
19
star
29

fulfillment-temperature-converter-nodejs

Sample demonstrating how to make a Dialogflow agent compatible with 9 platforms
JavaScript
19
star
30

fulfillment-faq-nodejs

Integrating Dialogflow's Knowledge Connectors, Phone Gateway, and Actions on Google
JavaScript
17
star
31

dialogflow-xamarin-client

Xamarin SDK for Dialogflow
C#
10
star
32

fulfillment-multi-locale-nodejs

Sample showing how to use multiple languages and locales (e.g. English and French)
JavaScript
10
star
33

city-streets-trivia-nodejs

This sample demonstrates how to create and update developer entities using the Dialogflow Node.js Client and the Dialogflow Fulfillment Library. It also demonstrates how to create session entities from your fulfillment code.
JavaScript
10
star
34

fulfillment-regex-nodejs

Validate Entities with Regular Expressions in Dialogflow's Fulfillment
JavaScript
8
star