Giter Club home page Giter Club logo

dfcx-sample-chat-widget's Introduction

Sample DFCX Chat Widget

Forked from github.com/botchway44/covid-vaccine-appointment with functionality unrelated to DFCX removed.

This repo provides a sample web frontend chat widget built using TypeScript/JavaScript for your DFCX bot.

Installation

Run the following to install Node dependencies:

npm install

Copy .env.default as .env and fill out the following variables:

  • AGENT_ID: ID of the DFCX agent, in the format of projects/project-id/locations/location-id/agents/agent-uuid
  • ENVIRONMENT_ID: an optional environment ID that this chat widget should connect to
  • DF_PROJECT_ID: ID of the GCP project whose API quota will be consumed
  • DF_PRIVATE_KEY: value of the private_key field from the service account’s JSON token
  • DF_PRIVATE_KEY_ID: value of the private_key_id field from the service account’s JSON token
  • DF_CLIENT_EMAIL: value of the client_email field from the service account’s JSON token
  • LANGUAGE_CODE: language of user input
  • INITIAL_QUERY: initial message sent to DFCX agent to get a response from the Default Welcome Intent

Running the app

After completing the installation steps, run the following:

npm run start:dev

Then, open this url in a browser: http://localhost:9000

License

Apache 2.0. See LICENSE.

dfcx-sample-chat-widget's People

Contributors

botchway44 avatar cbradgoog avatar

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.