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.
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 ofprojects/project-id/locations/location-id/agents/agent-uuid
ENVIRONMENT_ID
: an optional environment ID that this chat widget should connect toDF_PROJECT_ID
: ID of the GCP project whose API quota will be consumedDF_PRIVATE_KEY
: value of theprivate_key
field from the service account’s JSON tokenDF_PRIVATE_KEY_ID
: value of theprivate_key_id
field from the service account’s JSON tokenDF_CLIENT_EMAIL
: value of theclient_email
field from the service account’s JSON tokenLANGUAGE_CODE
: language of user inputINITIAL_QUERY
: initial message sent to DFCX agent to get a response from the Default Welcome Intent
After completing the installation steps, run the following:
npm run start:dev
Then, open this url in a browser: http://localhost:9000
Apache 2.0. See LICENSE.