GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - WebRTCventures/poc-appointments-with-vonage-ai: A PoC using Vonage AI for rescheduling appointments via chat

BranchesTags
Open more actions menu

Latest commit

 

History

31 Commits
31 Commits

Folders and files

NameName
Last commit message
Last commit date
.vscode
.vscode
 
 
functions
functions
 
 
gh-assets
gh-assets
 
 
public
public
 
 
src
src
 
 
.eslintrc.cjs
.eslintrc.cjs
 
 
.firebaserc
.firebaserc
 
 
.gitignore
.gitignore
 
 
.nvmrc
.nvmrc
 
 
README.md
README.md
 
 
appointment-agent-sep-5.zip
appointment-agent-sep-5.zip
 
 
firebase.json
firebase.json
 
 
firestore.indexes.json
firestore.indexes.json
 
 
firestore.rules
firestore.rules
 
 
index.html
index.html
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
sample.env
sample.env
 
 
tsconfig.json
tsconfig.json
 
 
tsconfig.node.json
tsconfig.node.json
 
 
vite.config.ts
vite.config.ts
 
 

Repository files navigation

POC: Appointments with Vonage AI

A proof of concept using Vonage AI for rescheduling appointments.

Quick demonstration

Demonstration in chat mode, it'll ask for a number and a new appointment date and time, and the screen on the right side will update in real time:

Chat demonstration

In voice mode, it'll do the same, but it won't ask for the phone number, because it'll be already identified from the caller's telephony information.

In both cases, notice how the inputs are somewhat flexible, allowing relative dates like "tomorrow", and only a few digits for the number.

Setting up

Firebase (BaaS)

It relies on Firebase as backend even for local development, so we have a vendor lock-in, but that's fine for a quick POC. Get ready to press some buttons here. But don't worry, all sensitive details are automated, you're just initializing the resources.

So open https://console.firebase.google.com/ and create a Project. No need to enable Analytics.

First, enable the database, look for a "Firestore Database" section and create it. Select the "test mode" while creating it for now.

Now, for the credentials. Look for a button that sounds like "Add Firebase to your web app", it's a wizard to generate your credentials.

By the way, if you're concerned with remote deploys, mark "Also set up Firebase Hosting for this app."

Stop when you see a config JSON, you'll need it for the next step.

Local setup (Node)

Using Node 18, just install dependencies:

nvm use
npm install

Create a safe environment variables for you called .env using the sample.env:

cp sample.env .env

Fill it with the data you gathered earlier in the Firebase step.

And run the app:

npm run dev

Deploying it (PaaS)

Just for clarifications, we'll need from this Cloud:

  • Firestore
  • Functions
  • Hosting

This might require you to put billing data, but you should not be charged since there's no way a simple proof of concept could exceed the no-charge limit, it's huge. Just remember to delete everything after any so nobody can abuse its usage.

TLDR, the commands are:

npm install -g firebase-tools
firebase login
npm run deploy

If you're maintaining a custom instance (made by someone else than the original repo author), you'll probably need to somehow override the project name used as target.

After the deploy finishes, look in the output for the console link to manage these resources, but you'll be mostly interested in the other links for the hosted app and for the hosted function. You can open the hosted app in your browser while the serverless function will be used as web hook for the Vonage Agent.

Vonage AI Studio (the rescheduling)

Create an Vonage AI Studio account for you and create an Agent which is how they call a programmed flow of conversation.

When you be prompted to Import an Agent, use the file available here in this repository called "appointment-agent" or something. Remember to update the hook step with the actual cloud function URL.

It'll be something like this (you can open the image in another tab to easily zoom in):

Example of the Vonage AI Studio flow for this application

In case you have to assemble something by yourself for any reason (like the importation not working), you must create one Agent from scretch. Just pick any steps you want to feel the variables, but concerning this integration the web hook step is what that matters most. It must be a POST to the serverless function with the following format, a valid JSON:

{ "phone": "$PHONE", "date": "$DATE", "time": "$TIME" }

Assuming that the variables are the ones named with the $ prefix, that should work. And they're typed in Vonage as sys.phone_number, sys.date and sys.time. For voice, you can add an assignment step saying that PHONE = $CALLER_PHONE_NUMBER, cause this later variable is injected by Vonage during a telephony call. This also means that, for the scope of this POC, you must go to the Firestore console and edit one of the guardian numbers to a real phone of yours, so the cloud function will identify you as such guardian for the rescheduling process. Remember to use your phone in the international format, with your country and area codes.

Licensing

This is proprietary software made by WebRTC.ventures & AgilityFeat and written by their favorite developer Marcell da Silva (Mazuh).

About

A PoC using Vonage AI for rescheduling appointments via chat

Topics

chatbotvonage-api

Resources

Readme
Activity
Custom properties

Stars

1 star

Watchers

2 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.