This application allows users to practice mock interviews or engage in various AI-driven conversations over the phone. It utilizes Flask as the backend framework and a third-party API for handling phone calls and voice interactions.
- Python: https://ai-convo.replit.app/
- Node.js/Typescript: https://voic.gptengineer.run/
- AI-Powered Conversations: Select from a variety of conversation types, including mock interviews (e.g., sales, cloud computing, HR), personal guidance (e.g., therapy, counseling), or fun engagements (e.g., virtual boyfriend/girlfriend, gamer friend).
- Voice Selection: Choose from different AI voices for the interaction.
- Phone Call Integration: Users receive a phone call to simulate the conversation, offering a more realistic practice experience.
- Customizable Prompts: Each conversation type has a pre-defined prompt that adapts based on the user's responses.
- Dynamic Intent and Tool Selection: The AI can dynamically recognize user intents and select appropriate tools to assist in the conversation based on user input and prerequisites.
Before running the application, ensure you have the following:
- Python 3.7+: The app is built using Python, so ensure that you have a compatible version installed.
- Flask: Flask is the web framework used to build the app. Install it using
pip install flask
. - Gunicorn: For production deployments, the app uses Gunicorn as the WSGI server. Install it using
pip install gunicorn
. - API Key: You need an API key from
bland.ai
to enable the phone call feature. Set it as an environment variable:BLAND_AI_API_KEY
. - Other Dependencies: Install the necessary Python packages listed in the
requirements.txt
file withpip install -r requirements.txt
.
-
Clone the Repository: Clone the project to your local machine.
-
Install Dependencies: Navigate to the project directory and run the following command to install the required packages:
pip install -r requirements.txt
-
Set Environment Variables: Ensure your
BLAND_AI_API_KEY
is set in your environment variables. You can do this by adding the following line to your.bashrc
,.zshrc
, or.env
file:export BLAND_AI_API_KEY="your_api_key_here"
-
Run the Application: For local development, you can run the Flask development server:
python app.py
For production, use Gunicorn:
gunicorn --workers 3 app:app
This command starts the application with 3 workers, which can be adjusted based on your server capacity.
-
Homepage: Visit the homepage of the app in your browser. Here, you will see options to select the conversation type, choose a voice, and input your phone number.
-
Starting a Call: After selecting your preferences, click the "Start Call" button. The app will initiate the phone call to the provided number using the selected conversation type and voice.
-
Phone Call: The user will receive a phone call where the AI will conduct the conversation based on the selected scenario (e.g., mock interview, counseling session).
The application offers a variety of conversation types, including:
- Interviews: Cloud Computing, Sales, HR Interview, AI Specialist
- Personal Guidance: Therapy, Counseling, Psychoanalysis, Life Coaching
- Fun Conversations: Virtual Girlfriend/Boyfriend, Gamer Friend
- Business Scenarios: Investor Pitch Advisor, Entrepreneur Coach, Business Executive Advisor
- Support Roles: Technical Support Specialist, IT Consultant
Each type has a pre-defined prompt and flow designed to simulate real-world conversations, adapting dynamically based on user input.
If you want to modify the conversation prompts, you can do so by editing the INTERVIEW_PROMPTS
dictionary in app.py
. Add or change any conversation type to fit your needs.
INTERVIEW_PROMPTS = {
"default": "Hi, it's the AI Interview Bot powered by rUve...",
"cloud_computing": "Welcome to the Cloud Computing interview...",
# Add more prompts here
}
The dynamic intent and tool selection feature allows the AI to adapt its behavior based on user input and prerequisites. This enables more personalized and context-aware interactions during phone conversations.
-
Dynamic Intent Recognition: The AI can recognize user intents dynamically based on the conversation flow. This is achieved by analyzing user input and matching it with predefined intents.
-
Tool Selection: Based on the recognized intent, the AI can select appropriate tools to assist in the conversation. For example, if the user is discussing scheduling, the AI can integrate with a calendly tool to provide available times.
-
Conversation Flow: The AI adapts the conversation flow based on the recognized intents and selected tools. This ensures that the conversation remains relevant and helpful to the user.
-
Select Interview Type: On the homepage, select the desired interview type from the dropdown menu. This will load the corresponding prompt and set the initial context for the conversation.
-
Start the Call: Enter your phone number and click the "Start Call" button. The AI will initiate the phone call and begin the conversation based on the selected interview type.
-
Dynamic Interaction: During the call, the AI will dynamically recognize user intents and select appropriate tools to assist in the conversation. For example, if the user mentions scheduling, the AI may provide available times using the calendly tool.
-
Mock Interviews: The AI can conduct mock interviews for various roles, such as cloud computing, sales, or HR. Based on the user's responses, the AI can adapt the conversation flow and provide relevant feedback.
-
Personal Guidance: The AI can offer personal guidance, such as therapy or counseling sessions. The AI can recognize user intents related to mental health and provide appropriate advice and resources.
-
Business Scenarios: The AI can assist in business scenarios, such as investor pitch preparation or entrepreneur coaching. The AI can recognize user intents related to business strategy and provide tailored advice.
For production deployment, you can use services like Heroku, AWS, or any other platform that supports Python web applications. Ensure you are using Gunicorn as your WSGI server, and configure a reverse proxy like Nginx if needed.
server {
listen 80;
server_name your_domain.com;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
In addition to the Python application, there is a JavaScript/TypeScript application located in the voic-tsx
directory. This application leverages modern web technologies such as React, TypeScript, and Vite to deliver a seamless and efficient user experience.
- Prompt Management: Easily manage and customize various prompts for different scenarios.
- Dynamic Intent Configuration: Configure custom intents and tools dynamically.
- Phone Call Integration: Integrate phone call functionalities with customizable settings.
- Advanced User Settings: Detailed settings for advanced users to fine-tune the application.
- API Integration: Seamless integration with external APIs for enhanced functionality.
To get started with the JavaScript/TypeScript application, follow these steps:
-
Clone the repository:
git clone https://github.com/ruvnet/voicebot.git cd voicebot/voic-tsx
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Build the application for production:
npm run build
-
Preview the production build:
npm run preview
The JavaScript/TypeScript application provides various configuration options to customize its behavior. Here are some key configuration details:
- API Key: Set your API key in the environment or in the settings.
- Webhook URL: Configure the webhook URL for receiving call events.
- Voice Settings: Customize voice settings using JSON strings.
- Context Management: Enable and configure context management settings.
- External Tools: Integrate external tools with customizable parameters.
For more detailed information, refer to the following documentation files:
Contributions are welcome! If you have any ideas for new conversation types or enhancements, feel free to submit a pull request.
This project is licensed under the MIT License.