Health Consultation
Build a health consultation app with using CVI and tool calls.
This application demonstrates a simple videocall with a Health Care Consultant persona. The application uses Tavus CVI to create an interactive AI host that responds to user inputs and performs actions through tool calls.
Prerequisites
Ensure that you have installed:
Node.js
Getting Started
Clone the Sample Project
Run the Sample Project
- Navigate to examples > health-consultation-with-tavus folder.
- Install modules:
- Run the project:
- Navigate to the
localhost:3000/health-consultation-with-tavus/
. - Enter your name and click General Health or Skin & Dermatology.
Tool Call Flow
Here’s a quick overview of how tool calls work in this Health Consultation app:
User Command Detected
The user says What is the cure to X ?
to the replica. The application listens for messages using:
Tool Call Detection
- The replica triggers the
get_cures
tool:
- The app then try to search the cure based on a defined dictionary:
Application Responds
- Once the result is generated, the app constructs and sends an echo message back to the replica:
- The replica receives the echo message and replies:
The cure for cold is Paracetamol.
User Command Detected
The user says What is the cure to X ?
to the replica. The application listens for messages using:
Tool Call Detection
- The replica triggers the
get_cures
tool:
- The app then try to search the cure based on a defined dictionary:
Application Responds
- Once the result is generated, the app constructs and sends an echo message back to the replica:
- The replica receives the echo message and replies:
The cure for cold is Paracetamol.
User Command Detected
The user says What is the cure to X ?
or What is the solution to X ?
to the replica. The application listens for messages using:
Tool Call Detection
The replica triggers the get_skin_cures
tool:
- Cures are retrieved from a predefined dictionary:
Application Responds
- Once the result is generated, the app constructs and sends an echo message back to the replica:
- The replica receives the echo message and replies:
The cure for pimples is Use a mild cleanser, avoid touching your face, and apply a benzoyl peroxide cream.
User Command Detected
The user says What is the cure to X ?
or What is the solution to X ?
to the replica. The application listens for messages using:
Tool Call Detection
The replica triggers the get_skin_cures
tool:
- Cures are retrieved from a predefined dictionary:
Application Responds
- Once the result is generated, the app constructs and sends an echo message back to the replica:
- The replica receives the echo message and replies:
The cure for pimples is Use a mild cleanser, avoid touching your face, and apply a benzoyl peroxide cream.
Replica Triggers Tool Call
If the replica visually detects acne on the participant’s face, it triggers the acne_detected
perception tool:
Application Responds
- The app constructs and sends an echo message back to the replica:
- The replica sends a helpful suggestion:
I notice that you have acne on your face. I suggest using topical antibiotics like clindamycin and erythromycin.