Visit Talx: https://talx.vercel.app/
Talx API powers the AI-driven functionalities of the Talx platform, providing intelligent features like ResumeAI and Chat Assistant AI. This backend is built with Flask and leverages advanced AI models, ensuring seamless integration of AI capabilities into the Talx ecosystem.
Talx API is the core AI backend for the Talx job portal, handling functionalities such as:
- Resume Analysis:
- Analyzes resumes and job descriptions, providing compatibility scores and actionable recommendations using Google Gemini 1.5 Flash.
- Chat Assistant:
- Powered by Llama 3.1 Versatile for career guidance and platform support.
- Streaming Responses:
- Real-time responses enhance user interaction, ensuring a smooth experience.
- ResumeAI:
Analyze resumes against job descriptions or general criteria to provide insights and recommendations. - Chat Assistant AI:
An intelligent assistant offering platform navigation help and career guidance. - Real-time Streaming:
Supports real-time AI responses for better interactivity. - Secure API:
Ensures protected access via authorization headers and environment variables.
-
Talx Frontend (Main Platform)
-
Talx Backend (Job Portal Backend)
GET /
- Description: Health check endpoint.
POST /upload-resume
- Description: Analyze a resume and optionally compare it with a job description.
- Headers:
Authorization
: Bearer token for API access.
- Form Data:
file
: PDF file of the resume.job_description
: (Optional) Text of the job description.
- Response:
{ "summary": { "matching_analysis": "Detailed analysis here.", "description": "Summary of relevance.", "score": 85, "skill_match_score": 90, "recommendation": "Suggestions for improvement." } }
- Note: The
skill_match_score
will only be included in the response if ajob_description
is provided.
- Note: The
POST /genie
- Description: Provides interactive career guidance and platform navigation help.
- Headers:
Authorization
: Bearer token for API access.
- Body Parameters:
{ "query": "User query here", "chat_history": [ {"role": "user", "content": "Previous query"}, {"role": "assistant", "content": "Previous response"} ] }
- Response: Real-time streaming of AI-generated content.
- Framework: Flask
- AI Models:
- Llama 3.1 Versatile by Meta (via Groq)
- Google Gemini 1.5 Flash Via Gemini AI Studio
- Utilities:
- Flask-CORS for Cross-Origin Resource Sharing
- Python libraries:
google.generativeai
,dotenv
,io
- Authorization: Secure endpoints with
Authorization
headers. - Streaming: Flask-SSE for real-time AI responses.
- Python 3.8+
- Environment variables set up in a
.env
file:AUTH_SECRET=your_secret_key GROQ_API_KEY=your_groq_api_key GOOGLE_GEMINI_API_KEY=your_google_gemini_key
-
Clone the repository:
git clone https://github.com/aakashdixit22/talx-api.git cd talx-api
-
Create a virtual environment:
python3 -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Run the API:
python api/index.py
-
The API will be available at
http://127.0.0.1:5000
.
Use Postman or cURL to test:
curl -X POST http://127.0.0.1:5000/upload-resume \
-H "Authorization: Bearer your_secret_key" \
-F "[email protected]" \
-F "job_description=Software Engineer role."
curl -X POST http://127.0.0.1:5000/genie \
-H "Authorization: Bearer your_secret_key" \
-H "Content-Type: application/json" \
-d '{"query": "How can I improve my resume?", "chat_history": []}'
This project is licensed under the MIT License.