This guide will help you set up and deploy the Asha AI chatbot (FastAPI backend + React frontend) on a Google Cloud VM instance using Docker.
cd frontend/my-app
npm install
npm run start
pip install -r requirements.txt
uvicorn backend.main:app
Use the Google Cloud Console or gcloud CLI to SSH into your VM instance.
cd AshaChatbot
git pull
Create a .env file in:
AshaChatbot/.env
AshaChatbot/ashaaiflow/.env
Add your required secrets:
- GEMINI_API_KEY=your_api_key
- SERPAPI_KEY=your_serpapi_key
- SECRET_KEY=your_secret
- ALGORITHM=HS256
- ACCESS_TOKEN_EXPIRE_MINUTES=30
- FERNET_KEY=your_fernet_key
- MODEL=gemini-1.5-flash
docker build -t fastapi-app .
docker run -d -p 8000:8000 fastapi-app
docker logs <container_id>
cd frontend/my-app
git pull
docker build -t my-asha-chatbot .
docker run -d -p 3000:3000 my-asha-chatbot
To allow external traffic to your VM:
Go to VPC Network > Firewall in the GCP Console.
Name: allow-http
Targets: All instances in the network
Source IP ranges: 0.0.0.0/0
Protocols and ports: Check Specified protocols and ports, then allow:
tcp:8000
tcp:3000
Now you can access your app via:
http://<your-external-vm-ip>:3000 # Frontend
http://<your-external-vm-ip>:8000 # Backend API
Your Asha AI Bot is now up and running on a GCP VM! 🎉 Make sure to monitor logs and container health for smooth operation.
-
User Interaction:
The user initiates a conversation with Asha AI via the frontend (React app). Asha listens to the user's query (e.g., job search, resume analysis, etc.). -
Intent Classification:
Asha's CrewAI-based agent classifies the user's intent (e.g., job search, mentorship, resume feedback). Based on this intent, the appropriate backend agent is triggered. -
Specialized Agents:
- Job Search Agent: Fetches relevant job listings from HerKey and SerpAPI.
- Resume Analyst: Analyzes and provides feedback on the uploaded resume.
- Learning Advisor: Recommends courses or learning resources based on user needs.
-
Response Generation:
The backend compiles the response (jobs, advice, feedback) and sends it back to the frontend. -
Bias Guardrails:
Throughout the conversation, Asha checks for gender bias in questions and redirects or reframes as needed. -
User Receives Feedback:
The frontend displays the relevant information (jobs, resources, or advice) to the user, offering a continuous, empathetic, and personalized experience.
