Skip to content

Up14/my-journal-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Journal AI

A chatbot built specifically for personal journals and diary entries. You upload your journal files, and then you can ask questions about your own writing — like "how was I feeling last week?", "what did I write about work in June?", or "what goals did I set this month?"

This is not a general-purpose chatbot. It is built around journaling — it understands emotions, dates, and entry types (reflections, goals, memories, dreams, etc.) in your journal.

What it does

  • Upload your journal or diary files (PDF, DOCX, DOC, TXT)
  • Ask questions about your own entries in plain language
  • Detects emotions in each journal entry (joy, anxiety, sadness, etc.)
  • Understands time-based queries like "last week", "yesterday", "this month"
  • Classifies entries by type: reflection, goal, gratitude, memory, dream, event, insight
  • Supports semantic search so you can find entries by meaning, not just keywords

How it works

  1. You upload a document
  2. The system splits it into chunks and converts them into vectors
  3. When you ask a question, it finds the most relevant chunks
  4. An AI model generates an answer based on those chunks

Requirements

  • Python 3.9 or higher
  • Ollama installed locally with the Mistral model
  • Qdrant running locally or on a remote server
  • Docker (to run Qdrant)
  • Tesseract OCR (only needed for scanned PDFs)

Setup

  1. Clone the repo:

    git clone <your-repo-url>
    cd Chatbot
    
  2. Create and activate a virtual environment:

    python -m venv venv
    

    On Windows:

    venv\Scripts\activate
    

    On macOS or Linux:

    source venv/bin/activate
    
  3. Install dependencies:

    pip install -r requirements.txt
    
  4. Create a .env file in the root folder with these values:

    OLLAMA_BASE_URL=http://localhost:11434
    QDRANT_URL=http://localhost:6333
    
  5. Start Qdrant using Docker:

    docker run -p 6333:6333 -p 6334:6334 qdrant/qdrant
    
  6. Pull and start the embedding model in Ollama:

    ollama run nomic-embed-text
    
  7. Start the server from the project root:

    uvicorn rag_chatbot.backend.main:app --reload
    

Open http://127.0.0.1:8000/docs in your browser to see and test all API endpoints.

Project structure

Chatbot/
├── rag_chatbot/
│   └── backend/
│       ├── api/               # API endpoints (chat, upload, search, status)
│       ├── generation/        # Response generation logic
│       ├── ingestion/         # Document processing pipeline
│       ├── query_processing/  # Query preprocessing (LLM and rule-based)
│       ├── retrieval/         # Search and retrieval logic
│       └── utils/             # Helper functions
├── requirements.txt
└── setup_project.py

API endpoints

Endpoint Method Description
/upload/ POST Upload a document
/chat/ POST Ask a question
/search/semantic POST Search by meaning
/search/metadata POST Filter by document properties
/search/hybrid POST Combine semantic and metadata search
/health GET Check if the server is running
/database GET Database stats
/system GET Full system status

Running tests

pytest

About

Chat with your personal journal entries — ask questions, find patterns, and explore your emotions across time

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages