{"id":24678125,"url":"https://github.com/itsvineetkr/ask-pdf-v0","last_synced_at":"2026-05-05T19:33:45.641Z","repository":{"id":272738089,"uuid":"917593129","full_name":"itsvineetkr/ask-pdf-v0","owner":"itsvineetkr","description":"This web application utilizes Langchain and FAST Api to help query PDFs and ask questions about it. It also maintaing conversation history and supports features like Speech to Text in multiple languages.","archived":false,"fork":false,"pushed_at":"2025-01-22T08:36:51.000Z","size":676,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-29T20:46:11.210Z","etag":null,"topics":["fastapi","huggingface","langchain","llm","python","rag"],"latest_commit_sha":null,"homepage":"","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/itsvineetkr.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}},"created_at":"2025-01-16T09:32:04.000Z","updated_at":"2025-01-25T19:18:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"10d71d8e-c9c5-4ef4-8ab0-eb9da062ad34","html_url":"https://github.com/itsvineetkr/ask-pdf-v0","commit_stats":null,"previous_names":["itsvineetkr/ask-pdf"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/itsvineetkr/ask-pdf-v0","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsvineetkr%2Fask-pdf-v0","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsvineetkr%2Fask-pdf-v0/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsvineetkr%2Fask-pdf-v0/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsvineetkr%2Fask-pdf-v0/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itsvineetkr","download_url":"https://codeload.github.com/itsvineetkr/ask-pdf-v0/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsvineetkr%2Fask-pdf-v0/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32665068,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["fastapi","huggingface","langchain","llm","python","rag"],"created_at":"2025-01-26T13:14:50.393Z","updated_at":"2026-05-05T19:33:45.622Z","avatar_url":"https://github.com/itsvineetkr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ask PDF\n\nThis web application utilizes Langchain and FAST Api to help query PDFs and ask questions about it. \nIt also maintains history and supports speech-to-text functionality, so you can ask questions in any language by just saying it.\nIt is built using Web Sockets, making it seamless in terms of interactions.\nIt uses Mistral AI from Hugging Face for the language model and Huggingface embeddings for creating a vector database of documents collected out of PDF for retrieval.\n\n## API endpoints\n1. /upload : This endpoint accepts a file and stores it in the local file system.\n2. /ask : This is the WebSocket end point that receives audio or text data from the client for processing.\n\n\n## Data storing\nThere are two models. One is `questions` which store all the questions and their answers for a particular pdf and the other one is `pdfMetadata` which stores the metadata of all the pdfs ever uploaded.\n\n## Installation\n\n1. **Clone the repository:**\n    ```bash\n    git clone https://github.com/itsvineetkr/ask-pdf.git\n    cd ask-pdf\n    ```\n\n2. **Create a virtual environment:**\n    ```bash\n    python3 -m venv venv\n    source venv/bin/activate  # On Windows use `venv\\Scripts\\activate`\n    ```\n\n3. **Install the dependencies:**\n    ```bash\n    pip install -r requirements.txt\n    ```\n\n## Setting up the .env file\n\n1. **Create a `.env` file in the root directory of your project.**\n\n2. **Add the following environment variables to the `.env` file:**\n    ```env\n    HUGGINGFACEHUB_API_TOKEN = \"hf_----xxxxxxx----\"\n    ```\n    Replace `hf_----xxxxxxx----` and `\u003cyour-secret-key\u003e` with your huggingface api key.\n\n3. **Add the Tavily API key to the `.env` file:**\n    ```env\n    TAVILY_API_KEY = \"\u003cyour-tavily-api-key\u003e\"\n    ```\n    Replace `\u003cyour-tavily-api-key\u003e` with your Tavily API key.\n\n## Running the Application\n\n1. **Start the FastAPI server:**\n    ```bash\n    uvicorn main:app --reload\n    ```\n\n    The application will be available at `http://localhost:8000/`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsvineetkr%2Fask-pdf-v0","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitsvineetkr%2Fask-pdf-v0","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsvineetkr%2Fask-pdf-v0/lists"}