Skip to content

sauravbajra/career-doc-copilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Career & Doc Copilot 🚀

A dual-purpose AI assistant built with Python, Streamlit, and LangChain. Chat with your PDFs or get resume feedback.

Features

  • DocuChat - Upload any PDF and ask questions about its content
  • CareerCopilot - Upload a resume, paste a job description, get feedback, cover letters, interview prep
  • Local-first - Run entirely locally with Ollama, or use cloud APIs
  • API - Programmatic access for automation tools like picoclaw

Quick Start

cd career-doc-copilot
python3 -m venv venv
source venv/bin/activate  # macOS/Linux
# or: venv\Scripts\activate  # Windows
pip install -r requirements.txt
cp .env.example .env
streamlit run app.py

Running Both UI and API

# Terminal 1: API server (port 8601)
uvicorn api:app --port 8601

# Terminal 2: Streamlit UI
streamlit run app.py

LLM Providers

Switch between providers via the sidebar dropdown:

  • Open Code Zen - Cloud models (Claude Sonnet 4.5, MiniMax, Kimi, etc.)
  • Ollama (Local) - Run models locally (requires ollama serve)

Available Zen Models

  • Claude Sonnet 4.5
  • MiniMax M2.5 / M2.5 Free
  • Kimi K2.5
  • MiMo V2 Pro / V2 Omni
  • Nemotron 3 Super

Using Ollama

# Install Ollama: https://ollama.ai
ollama serve
ollama pull llama3.2  # or any model you want to use

API Keys

Create a .env file with:

OPEN_CODE_ZEN_API_KEY=your_key_here
GOOGLE_API_KEY=your_key_here  # for embeddings (optional, local fallback available)
API_PORT=8601  # optional, defaults to 8601

Project Structure

career-doc-copilot/
├── app.py                    # Main Streamlit entry point
├── api.py                    # FastAPI for programmatic access
├── components/
│   ├── doc_chat.py           # DocuChat (PDF RAG)
│   ├── resume_analyzer.py    # CareerCopilot
│   └── response_history.py   # Past responses review
├── utils/
│   ├── llm_factory.py        # LLM provider setup
│   ├── pdf_handler.py        # PDF text extraction
│   ├── prompts.py            # System prompts
│   └── storage.py            # SQLite for response history
├── .env                      # Your config (not in git)
├── .env.example              # Template
└── requirements.txt

API Endpoints

Endpoint Method Description
/health GET Health check
/api/models GET List available models
/api/cover-letter POST Generate cover letter
/api/analyze POST Resume analysis
/api/chat POST Document Q&A

Example:

curl -X POST http://localhost:8601/api/cover-letter \
  -H "Content-Type: application/json" \
  -d '{"resume_text": "...", "job_description": "..."}'

Tech Stack

  • Streamlit (UI)
  • FastAPI (programmatic access)
  • LangChain (AI orchestration)
  • ChromaDB (Vector store, local)
  • Ollama / Open Code Zen (LLM providers)
  • Google Gemini / HuggingFace (Embeddings)

Learning Purpose

This project was built as a hands-on learning exercise to understand the fundamentals of building AI-powered applications with LLMs and vector databases.

What Was Learned

  1. RAG (Retrieval Augmented Generation)

    • How to ingest PDFs, chunk text, and store embeddings in a vector database
    • Building a retrieval chain that fetches relevant context before generation
  2. LLM Integration

    • Connecting to different LLM providers (OpenAI-compatible APIs, Ollama)
    • Using LangChain's ChatModel interface with fallbacks
  3. Embeddings & Vector Stores

    • Using Google Gemini embeddings vs. local HuggingFace embeddings
    • ChromaDB for local, persistent vector storage
  4. Streamlit for AI Apps

    • Building interactive UIs with chat interfaces, file uploaders, and session state
    • Managing app lifecycle and re-runs
  5. FastAPI for Programmatic Access

    • Exposing AI capabilities via REST API for automation

Key Takeaways

  • Local-first AI apps are viable with Ollama - no API costs, fully offline
  • Fallback chains make apps more robust (cloud when local fails)
  • The same pattern (embed → store → retrieve → generate) applies to many AI apps
  • APIs enable integration with other tools and workflows

About

This project was built as a hands-on learning exercise to understand the fundamentals of building AI-powered applications with LLMs and vector databases.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors