An intelligent AI-powered chatbot that serves as a virtual career assistant for Abhishek Datta, answering questions about his professional background, skills, and experience. Built with OpenAI's GPT-4o-mini and Gradio, this chatbot provides an interactive way for potential employers, clients, and recruiters to learn about Abhishek's 20+ years of experience in DevOps, SRE, and Chaos Engineering.
💡 Make It Your Own: This project is fully open-source and customizable! Download the code, replace the career data with your own, and deploy your personalized AI career assistant in minutes. Perfect for professionals looking to create an interactive portfolio or automated career information hub.
Before Deploying:
🔐 Security: This application requires API keys stored as environment variables. Never commit API keys to version control. Use secure secret management for production deployments.
💰 API Costs: This application uses OpenAI's API which incurs costs per request. Monitor your usage on the OpenAI dashboard. Set up billing alerts and rate limits to prevent unexpected charges.
🔒 Privacy: Your LinkedIn profile and personal summary will be publicly accessible through the chatbot. Only include information you're comfortable sharing publicly. Do not include sensitive personal data.
🚫 No Authentication: This is a public-facing chatbot without built-in authentication or rate limiting. Anyone can interact with it, potentially leading to API abuse or unexpected costs.
⚙️ Customization Required: This code must be customized with your own data before deployment. Replace placeholder values (
YOUR NAME HERE,your_email@example.com) and add your career information.📊 Data Collection: The application collects visitor emails and logs questions via Pushover notifications. Ensure compliance with privacy regulations (GDPR, CCPA, etc.) in your jurisdiction.
Recommendation: Test thoroughly in a development environment before deploying publicly. Monitor costs and usage regularly after deployment.
Try the chatbot here: AbhishekDatta Career Chatbot
This repository includes comprehensive documentation to help you get started:
- QUICKSTART.md - Get up and running in 5 minutes
- SETUP.md - Detailed step-by-step installation and configuration guide
- DEPLOYMENT.md - Complete guide for deploying to Hugging Face Spaces
- SECURITY.md - Security best practices, risk assessment, and compliance guidelines
- CONTRIBUTING.md - Guidelines for contributing to the project
- CODE_COMPARISON.md - Comparison between app.py and app_documented.py versions
- PROJECT_STRUCTURE.md - Detailed explanation of repository structure and file organization
- GITIGNORE_GUIDE.md - Understanding what files are ignored and why
- CHECKLIST.md - Step-by-step checklist for setting up your GitHub repository
- PACKAGE_SUMMARY.md - Overview of all files included in this package
- Features
- How It Works
- Technology Stack
- Project Structure
- Installation
- Configuration
- Usage
- Code Explanation
- Deployment
- Future Enhancements
- Contributing
- License
- Contact
- Intelligent Conversation: Powered by OpenAI's GPT-4o-mini model for natural, context-aware responses
- Career Information: Answers questions about professional experience, skills, achievements, and career trajectory
- Lead Capture: Automatically collects contact information from interested visitors
- Question Tracking: Records unanswerable questions for continuous improvement
- Real-time Notifications: Sends instant alerts via Pushover when visitors express interest
- Context-Aware: Uses LinkedIn profile and personal summary for accurate, detailed responses
- Professional Tone: Maintains a professional and engaging communication style
- 24/7 Availability: Always available to answer questions about Abhishek's career
User Query → Gradio Interface → OpenAI GPT-4o-mini → Response Generation
↓
Function Calling (Tools)
↓
┌───────────────────┴───────────────────┐
↓ ↓
record_user_details record_unknown_question
↓ ↓
Pushover Notification Pushover Notification
- User Interaction: Visitor asks a question through the Gradio chat interface
- Context Loading: System loads Abhishek's LinkedIn profile and personal summary
- AI Processing: GPT-4o-mini processes the query with full context
- Response Generation: AI generates a professional, accurate response
- Tool Execution: If needed, the AI can:
- Record visitor contact details
- Log questions it cannot answer
- Notification: Pushover sends real-time alerts for important interactions
| Technology | Purpose |
|---|---|
| Python 3.8+ | Core programming language |
| OpenAI GPT-4o-mini | Large Language Model for conversation |
| Gradio 5.31.0 | Web UI framework for chat interface |
| pypdf | PDF parsing for LinkedIn profile |
| Pushover | Real-time push notifications |
| python-dotenv | Environment variable management |
| Hugging Face Spaces | Deployment platform |
.
├── app.py # Main application file
├── requirements.txt # Python dependencies
├── README.md # Project documentation
├── .env # Environment variables (not tracked)
├── me/
│ ├── linkedin.pdf # LinkedIn profile data
│ └── summary.txt # Personal summary and career breaks
└── thumbnail.jpg # Project thumbnail
- Python 3.8 or higher
- OpenAI API key
- Pushover account (for notifications)
-
Clone the repository
git clone https://github.com/AbhishekDatta/ai-career-chatbot.git cd ai-career-chatbot -
Create a virtual environment (recommended)
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables Create a
.envfile in the project root:OPENAI_API_KEY=your_openai_api_key_here PUSHOVER_TOKEN=your_pushover_app_token PUSHOVER_USER=your_pushover_user_key
Note: Simply visit https://pushover.net/ and sign up for a free account, and create your API keys.
Create two tokens in Pushover:
- The User token which you get from the home page of Pushover
- The Application token which you get by going to https://pushover.net/apps/build and creating an app
-
Prepare your data
- Create a
me/directory - Add your
linkedin.pdf(export your LinkedIn profile as PDF) - Add your
summary.txtwith personal background information
- Create a
| Variable | Description | Required |
|---|---|---|
OPENAI_API_KEY |
Your OpenAI API key | Yes |
PUSHOVER_TOKEN |
Pushover application token | Yes |
PUSHOVER_USER |
Pushover user key | Yes |
To customize the chatbot for your own use:
-
Update Personal Information in
app.py:self.name = "Your Name"
-
Modify System Prompt: Edit the
system_prompt()method to adjust the chatbot's behavior -
Replace Data Files:
- Replace
me/linkedin.pdfwith your LinkedIn profile - Update
me/summary.txtwith your personal information
- Replace
python app.pyThe application will start a local Gradio server. Access it at:
http://127.0.0.1:7860
Example queries you can ask:
- "Tell me about your experience in Site Reliability Engineering"
- "What is your leadership experience?"
- "Have you worked with Chaos Engineering?"
- "What are your key achievements?"
- "Can you explain your career breaks?"
- "What technologies do you specialize in?"
def push(text):
"""
Sends push notifications via Pushover API
Args:
text (str): Message to send
"""
requests.post(
"https://api.pushover.net/1/messages.json",
data={
"token": os.getenv("PUSHOVER_TOKEN"),
"user": os.getenv("PUSHOVER_USER"),
"message": text,
}
)- Sends real-time notifications when important events occur
- Uses Pushover service for reliable push notifications
- Alerts when visitors provide contact info or ask unanswerable questions
record_user_details()
- Captures visitor contact information (email, name, notes)
- Triggers notification for lead follow-up
- Returns confirmation of successful recording
record_unknown_question()
- Logs questions the AI cannot answer
- Helps identify knowledge gaps
- Enables continuous improvement of the chatbot
The chatbot uses OpenAI's function calling feature to execute specific actions:
record_user_details_json = {
"name": "record_user_details",
"description": "Use this tool to record that a user is interested...",
"parameters": {
"type": "object",
"properties": {
"email": {"type": "string", "description": "The email address..."},
"name": {"type": "string", "description": "The user's name..."},
"notes": {"type": "string", "description": "Any additional information..."}
},
"required": ["email"]
}
}These JSON schemas define:
- Function name and description
- Expected parameters
- Required vs. optional fields
- Help GPT understand when and how to use each tool
Initialization (__init__)
def __init__(self):
self.openai = OpenAI() # Initialize OpenAI client
self.name = "YOUR NAME HERE" # Set identity
# Load LinkedIn profile from PDF
reader = PdfReader("me/linkedin.pdf")
self.linkedin = ""
for page in reader.pages:
text = page.extract_text()
if text:
self.linkedin += text
# Load personal summary
with open("me/summary.txt", "r", encoding="utf-8") as f:
self.summary = f.read()- Creates OpenAI client instance
- Extracts text from LinkedIn PDF using pypdf
- Loads personal summary from text file
- Prepares all context data for the AI
Tool Call Handler (handle_tool_call)
def handle_tool_call(self, tool_calls):
"""
Executes function calls requested by the AI model
Args:
tool_calls: List of tool calls from OpenAI response
Returns:
List of tool execution results
"""
results = []
for tool_call in tool_calls:
tool_name = tool_call.function.name
arguments = json.loads(tool_call.function.arguments)
print(f"Tool called: {tool_name}", flush=True)
# Dynamically call the function by name
tool = globals().get(tool_name)
result = tool(**arguments) if tool else {}
# Format result for OpenAI
results.append({
"role": "tool",
"content": json.dumps(result),
"tool_call_id": tool_call.id
})
return results- Processes tool calls made by GPT
- Dynamically executes the requested function
- Returns results in OpenAI-compatible format
- Enables the conversation to continue with tool outputs
System Prompt Generator (system_prompt)
def system_prompt(self):
"""
Creates the system prompt with context for the AI model
Returns:
Complete system prompt string with career context
"""
system_prompt = f"You are acting as {self.name}. ..."
system_prompt += f"\n\n## Summary:\n{self.summary}\n\n"
system_prompt += f"## LinkedIn Profile:\n{self.linkedin}\n\n"
system_prompt += f"With this context, please chat with the user..."
return system_prompt- Defines the AI's role and behavior
- Injects LinkedIn profile and summary as context
- Sets conversation guidelines and objectives
- Instructs AI on when to use tools
Chat Handler (chat)
def chat(self, message, history):
"""
Main chat processing function with tool call support
Args:
message (str): User's current message
history (list): Conversation history from Gradio
Returns:
AI's response as a string
"""
# Build message list with system prompt and history
messages = [
{"role": "system", "content": self.system_prompt()}
] + history + [
{"role": "user", "content": message}
]
done = False
while not done:
# Call OpenAI API
response = self.openai.chat.completions.create(
model="gpt-4o-mini",
messages=messages,
tools=tools
)
# Check if AI wants to call a tool
if response.choices[0].finish_reason == "tool_calls":
message = response.choices[0].message
tool_calls = message.tool_calls
# Execute the tool calls
results = self.handle_tool_call(tool_calls)
# Add tool calls and results to conversation
messages.append(message)
messages.extend(results)
else:
done = True
return response.choices[0].message.contentKey Features of the Chat Loop:
- System Prompt Injection: Every conversation includes the system prompt with context
- History Management: Maintains conversation continuity
- Tool Call Loop: Keeps calling OpenAI until no more tools are needed
- Gradio Integration: Compatible with Gradio's message format
Start
↓
Load LinkedIn PDF & Summary
↓
Initialize Gradio Interface
↓
Wait for User Message
↓
Build Messages Array (System + History + User)
↓
Call OpenAI API
↓
Check Response ──→ [Tool Call?] ──→ Yes ──→ Execute Tool
│ ↓
│ Add to Messages
│ ↓
│ Call OpenAI Again
│ ↓
└────────────←─────────────────────────────┘
↓
No (Regular Response)
↓
Return Response to User
↓
Display in Gradio
- Create a new Space on Hugging Face
- Select Gradio SDK with Python 3.8+
- Upload files:
app.pyrequirements.txtme/linkedin.pdfme/summary.txtREADME.md(optional, but recommended)
- Add secrets in Space settings:
OPENAI_API_KEYPUSHOVER_TOKENPUSHOVER_USER
- The Space will automatically build and deploy
- Docker: Containerize the application
- AWS/GCP/Azure: Deploy on cloud platforms
- Heroku: Use for simple deployment
- Railway: Quick deployment with environment variables
Potential features and improvements:
- Multi-language Support: Add support for multiple languages
- Voice Interface: Integrate speech-to-text and text-to-speech
- Analytics Dashboard: Track conversation metrics and popular questions
- Resume Generation: Automatically generate formatted resumes
- Interview Prep: Practice interview questions with AI feedback
- Skill Assessment: Provide detailed technical skill assessments
- Video Responses: Generate short video responses for key questions
- CRM Integration: Connect with Salesforce, HubSpot, etc.
- Calendar Integration: Schedule meetings directly through the chat
- Custom Branding: White-label solution for other professionals
- A/B Testing: Test different conversation strategies
- Sentiment Analysis: Analyze visitor sentiment and engagement
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow PEP 8 style guidelines
- Add comments and docstrings
- Update README if adding new features
- Test thoroughly before submitting PR
When deploying this application, follow these security guidelines:
- ✅ Store all API keys in environment variables or secure secret management systems
- ✅ Never commit
.envfiles or API keys to version control - ✅ Rotate API keys regularly
- ✅ Use separate API keys for development and production
- ✅ Set up billing alerts in your OpenAI account
- ✅ Implement rate limiting to prevent API abuse
- ✅ Monitor API usage regularly via OpenAI dashboard
- ✅ Set maximum spending limits on your OpenAI account
- ✅ Only include information you're comfortable making public
- ✅ Review your LinkedIn profile and summary for sensitive data
- ✅ Comply with privacy regulations (GDPR, CCPA) in your jurisdiction
- ✅ Add a privacy policy if collecting user data
- ✅ Test thoroughly in a staging environment first
- ✅ Implement proper logging and monitoring
- ✅ Consider adding authentication for sensitive deployments
- ✅ Set up error tracking (e.g., Sentry, Rollbar)
- ✅ Have a rollback plan ready
- ✅ Use Spaces Secrets for all sensitive credentials
- ✅ Set Space visibility to Private if needed
- ✅ Monitor Space logs regularly
- ✅ Be aware that free tier has resource limitations
This project is licensed under the MIT License - see the LICENSE file for details.
Abhishek Datta
- Email: contactabhishekdatta@gmail.com
- LinkedIn: linkedin.com/in/a-datta
- GitHub: github.com/AbhishekDatta
- Medium: @AbhishekDatta22
- Ed Donner - Udemy trainer whose excellent Agentic AI Engineering course provided the foundational knowledge and implementation patterns for this project
- OpenAI for providing the GPT-4o-mini model
- Gradio for the amazing UI framework
- Hugging Face for free hosting on Spaces
- Pushover for reliable push notifications
⭐ If you find this project useful, please consider giving it a star!
Made with ❤️ by Abhishek Datta