{"id":41467594,"url":"https://github.com/testpress/langchain-pdf-qa","last_synced_at":"2026-01-23T16:34:21.656Z","repository":{"id":292994115,"uuid":"982569031","full_name":"testpress/langchain-pdf-qa","owner":"testpress","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-08T07:17:43.000Z","size":340,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-08T08:30:47.264Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/testpress.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-13T04:59:10.000Z","updated_at":"2025-07-08T07:17:46.000Z","dependencies_parsed_at":"2025-05-13T07:24:06.272Z","dependency_job_id":"13950235-99e4-473d-b10b-1f26890ff6f2","html_url":"https://github.com/testpress/langchain-pdf-qa","commit_stats":null,"previous_names":["testpress/langchain-pdf-qa"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/testpress/langchain-pdf-qa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testpress%2Flangchain-pdf-qa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testpress%2Flangchain-pdf-qa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testpress%2Flangchain-pdf-qa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testpress%2Flangchain-pdf-qa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/testpress","download_url":"https://codeload.github.com/testpress/langchain-pdf-qa/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testpress%2Flangchain-pdf-qa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28695553,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T15:57:05.722Z","status":"ssl_error","status_checked_at":"2026-01-23T15:56:27.656Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-23T16:34:21.569Z","updated_at":"2026-01-23T16:34:21.643Z","avatar_url":"https://github.com/testpress.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📄 LangChain PDF Q\u0026A\n\nAsk questions from any PDF using OpenAI + LangChain + Chroma.\n\nThis project lets you upload a PDF and ask natural language questions about its content. It uses:\n- [LangChain](https://github.com/langchain-ai/langchain)\n- [OpenAI API](https://platform.openai.com/)\n- [Chroma Vector Store](https://www.trychroma.com/)\n\n---\n\n## 🔧 Setup\n\n### 1. Clone the repo\n\n```bash\ngit clone https://github.com/yourname/langchain-pdf-qa.git\ncd langchain-pdf-qa\n```\n\n### 2. Install uv (if not already installed)\n\n```bash\ncurl -Ls https://astral.sh/uv/install.sh | sh\n```\n\n### 3. Install dependencies\n\n```bash\nuv sync\n```\n\n### 3. Add your OpenAI API key\n\nCreate a `.env` file based on the example:\n\n```bash\ncp .env.example .env\n```\n\nThen edit `.env` and replace with your API key.\n\n---\n\n## ▶️ Run the Q\\\u0026A CLI\n\n```bash\nuv run python ask_pdf.py\n```\n\nPlace a PDF file (e.g., `example.pdf`) in the root and run the script. You’ll be prompted to ask questions like:\n\n* \"What is this document about?\"\n* \"Who is the author?\"\n* \"Summarize the key findings.\"\n\nType `exit` to quit.\n\n---\n\n## 🧪 Example\n\n```text\nAsk a question (or type 'exit'): What is the main purpose of this document?\n\nAnswer: This document provides an overview of ...\n```\n\n---\n\n## 📁 Project Structure\n\n```\n.\n├── ask_pdf.py\n├── example.pdf        # Your PDF file (not committed)\n├── .env               # Your API key (not committed)\n├── .env.example\n├── pyproject.toml\n├── README.md\n├── .gitignore\n```\n\n---\n\n## 🛡️ Note\n\nDo not commit your `.env` file or PDF files to GitHub. Use `.gitignore` to keep them private.\n\n---\n\n## 💡 Ideas for Extension\n\n* Add a Streamlit or Flask UI\n* Use FAISS or Pinecone as vector store\n* Deploy to Hugging Face Spaces or Render\n\n---\n\n## 🛠️ Development with uv\n\nThis project uses [uv](https://github.com/astral-sh/uv) for dependency management and Python environment handling.\n\n### Common uv commands:\n\n```bash\n# Install dependencies\nuv sync\n\n# Run a script\nuv run python ask_pdf.py\n\n# Add a new dependency\nuv pip install package-name\n\n# Remove a dependency\nuv pip uninstall package-name\n\n# Update dependencies\nuv sync --upgrade\n\n# Run tests\nuv run python -m pytest\n\n# Activate the virtual environment (if needed)\nsource .venv/bin/activate\n```\n\n### Why uv?\n\n- **Fast**: Much faster than pip and Poetry\n- **Reliable**: Better dependency resolution\n- **Simple**: Single tool for environment management, dependency installation, and running scripts\n- **Modern**: Built for Python 3.13+ with modern tooling\n\n---\n\n## 🧑‍💻 License\n\nMIT — free to use and modify.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestpress%2Flangchain-pdf-qa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftestpress%2Flangchain-pdf-qa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestpress%2Flangchain-pdf-qa/lists"}