Giter Club home page Giter Club logo

dialogflow-web-v2's Introduction

Dialogflow for Web v2

Dialogflow for Web v2

Dialogflow lets you build conversational interfaces on top of your products and services by providing a powerful natural language understanding (NLU) engine to process and understand natural language input

This is a unofficial Web Integration for the Dialogflow V2

The development of the project is done by mishushakov in his free-time. If you want to support, click the "Sponsor" button:

Support Dialogflow for Web v2

If you have any questions, feel free to contact

Features

  • Progressive Web App (100/100 Lighthouse score)
  • Accessibility Features
  • Extensive Browser Support (IE8+), offline capabilities (history) and great SEO
  • Familiar UI & UX, based on the official Google Assistant Design Specifications
  • Dark Mode & Theming
  • Hands-free interaction with Voice Input and Speech Feedback
  • Language Independency
  • Docker and Kubernetes support
  • Rich-component, Webhook and Actions on Google Support (demo)
  • Floating Widget for embedding on websites (demo)
  • Based on Vue, Webpack, Babel and PostCSS
  • Lightweight (build is <50KB gzipped)
  • Free and fully Documented
  • Made in Germany
  • Recommended by Dialogflow and MadeWithVueJS:

New in this version

  • New tooling: Vue CLI
  • Better accessibility & audit
  • Better layout, semantics and flexbox
  • Better carousels
  • Improved speed (~3x) & reliability
  • Improved code quality and logic
  • Nicer look and feel
  • GitHub Pages, Actions and Registry
  • Support for Dialogflow SSML
  • Updated docs and demos
  • More theming option: custom fonts
  • Reduced bundle size (~50%)

Installation

Requirements

  • NodeJS
  • npm or Yarn
  • Google Account and Dialogflow V2 Agent (if you look for V1, please use my old repo)

Set up Dialogflow Gateway (backend)

Dialogflow Gateway enables third-party integrations like this one to securely access the Dialogflow V2 API

AD Dialogflow Gateway by Ushakov (Hosted) is the quickest way to get started with Dialogflow for Web v2

Clone the repository

You can use git or download from GitHub

Clone Dialogflow for Web v2

Get the dependencies

Open the cloned folder. Then, using your favorite package manager get the dependencies

Using npm

npm i

Using yarn

yarn

Connect your Agent

Open config.js and change the gateway variable to your Dialogflow Gateway URL

Hint: the URL for Dialogflow Gateway Hosted by Ushakov is always your google cloud project id + .gateway.dialogflow.cloud.ushakov.co. If you have any troubles, make sure you connected your Agent to the Gateway, then visit the console, click on "Manage" and copy the Gateway URL

Example

export default {
    app: {
        gateway: "https://dialogflow-web-v2.gateway.dialogflow.cloud.ushakov.co"
        [...]
    }
}

[...]

The logo, agent name, description and available languages are fetched from Dialogflow. Change them in Dialogflow and it will sync to the UI. Please note, when adding new languages, you may have to translate some of the UI as well (i18n field in config.js)

Developing

Open your cloned folder. Then, using your favorite package manager run the serve command

Using npm

npm run serve

Using yarn

yarn serve

Your default browser should open and redirect to localhost:8080. If the port 8080 is already in use, you can give a port argument to connect at specified port

Using npm

npm run serve --port 9090

Using yarn

yarn serve --port 9090

PLEASE DO NOT USE THE DEVELOPMENT SERVER TO SERVE YOUR APP FOR VISITORS, DEVELOPMENT SERVER IS MEANT FOR THE DEVELOPMENT. PLEASE UPLOAD BUILD ARTIFACTS TO A STATIC WEB-SERVER

Theming

You can make a custom theme for Dialogflow for Web v2, according to the specification:

Theme Dialogflow for Web v2

To apply the variables, open src/components/App/Theme.sass and change them in the \:root selector

You can also optimize your theme for Dark-mode-enabled clients within the same file and selector under the @media (prefers-color-scheme: dark)

Building

Your app will be bundled to the dist directory

To build it you can use npm or yarn

Using npm

npm run build

Using yarn

yarn build

Frequently Asked Questions

  • Q: I don't see any changes
  • A: Make sure you cleaned the cache and rebuilt the app. In Safari go to "Develop" > "Empty Caches". In Chrome: "Developer Tools" > "Application" > "Clear storage" > "Clear site data"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.