O ctopus Books is an AI-powered reading companion that lets you upload any book, chapter, or manuscript and have a thoughtful, memory-rich conversation with it. Powered by GPT-4o, LangChain, and real-time document embeddings, the app remembers everything you've discussed and pulls context from across the pages so you can reflect, question, and explore ideas as deeply as you like.
π§ Live Architecture
- Streamlit Cloud: Serves the conversational reading app with a sleek, reactive UI
- LangChain: Orchestrates RAG pipeline and manages chat memory per session
- ChromaDB (Local): Stores embedded chunks from uploaded books for fast retrieval
- OpenAI GPT-4o: Powers real-time, context-aware responses from your book
- Session Memory: Maintains ongoing chat history to simulate deep, evolving conversations
- Temporary File Storage: Uploaded PDFs processed securely and discarded after use
Backend
Python
LangChain (RAG)
Chroma (Vector Store)
Frontend
Streamlit
Minimal HTML
AI Engine / Function Calling
OpenAI GPT-4o
Prompt + Output Parsers
PyPDFLoader
Infrastructure
Streamlit Cloud
SQLite3 (local logging)
CI / CD
GitHub Actions
Step 1: Upload a Book
Start by uploading a PDF of a book, manuscript, or article. Octopus Books processes it instantly and prepares it for exploration.
Step 2: Slice & Embed
The app splits your book into overlapping chunks and stores them as vector embeddings using ChromaDB for fast, meaningful retrieval.
Step 3: Ask Anything
Ask thoughtful or specific questionsβper chapter, per theme, or across the entire text. GPT-4o generates responses using both your query and the retrieved context.
Step 4: Track the Thread
Each conversation is saved in session memory, so the more you ask, the richer and more context-aware your book becomesβlike reading with a brilliant friend.
Step 5: Reflect & Rediscover
Use Octopus Books to reread, reframe, and reimagine your favorite works. Ask what you missed, test theories, or trace characters through the plot.
"I always wanted a way to explore my favorite books more deeply. Octopus Books makes it feel like the story is thinking back." - Maya Zhou
Octopus_Books_V2/
β
βββ ebook_tutor.py # Streamlit app for chatting with uploaded books
βββ requirements.txt # Python dependencies for LangChain, OpenAI, Streamlit
βββ README.md # Project overview and usage instructions
βββ LICENSE # Open source license
βββ .gitignore # Ignores environment files, __pycache__, etc.
βββ .gitattributes # GitHub linguist and text file handling config
βββ .DS_Store # (macOS file β safe to ignore or delete)
git clone https://github.com/LannonTheCannon/Octopus_Books_V2.git cd Octopus_Books_V2 python3 -m venv venv source venv/bin/activate pip install -r requirements.txt streamlit run ebook_tutor.py