{"id":18587564,"url":"https://github.com/inanyan/chatwithpdfs","last_synced_at":"2025-11-01T23:30:31.498Z","repository":{"id":229377095,"uuid":"776574972","full_name":"InAnYan/ChatWithPDFs","owner":"InAnYan","description":"Prototype app for question answering over a library of PDF files","archived":false,"fork":false,"pushed_at":"2025-02-11T14:39:49.000Z","size":2582,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-11T15:29:49.771Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/InAnYan.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}},"created_at":"2024-03-23T22:04:21.000Z","updated_at":"2025-02-11T14:39:53.000Z","dependencies_parsed_at":"2024-03-23T23:21:12.426Z","dependency_job_id":"d4f40568-5883-43e2-94bd-4bcecaac36ad","html_url":"https://github.com/InAnYan/ChatWithPDFs","commit_stats":null,"previous_names":["inanyan/chatwithpdfs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InAnYan%2FChatWithPDFs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InAnYan%2FChatWithPDFs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InAnYan%2FChatWithPDFs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InAnYan%2FChatWithPDFs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InAnYan","download_url":"https://codeload.github.com/InAnYan/ChatWithPDFs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239340504,"owners_count":19622704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-11-07T00:39:38.023Z","updated_at":"2025-11-01T23:30:31.432Z","avatar_url":"https://github.com/InAnYan.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ChatWithPDFs\n\n![Screenshot](screenshot.jpg)\n\nPrototype app for question answering over a library of PDF files.\n\nCreated to demonstrate the capability to contribute to Google Summer of Code 2024 at JabRef.\n\n## Features\n\n- It supports QA either for one PDF file or several PDF file in one directory.\n- It uses `AllMiniLmL6V2EmbeddingModel` and `OpenAiChatModel`.\n\n## How to Run this Project\n\n```sh\nprogram \u003cAPI_KEY\u003e \u003cPATH\u003e\n```\n\nWhere:\n\n- `API_KEY`: OpenAI API key/token.\n- `PATH`: path to one PDF file or a folder containing several PDF files.\n\n## How this Project is Implemented\n\nTech stack:\n\n- OpenAI API\n- `langchain4j`\n- Apache PDFBox\n\nThe program contains of 2 algorithms:\n\n1. Indexing\n   1. PDF files are loaded into memory.\n   2. Text is extracted from PDFs.\n   3. This text is then splitted into smaller chunks.\n   4. An embedding model generates a vector for each chunk.\n   5. Vector-chunk pair is stored in a vector database.\n2. Chatting\n   1. User message is converted into a vector.\n   2. Vector database searches for chunks with a similar (close) vector.\n   3. Found chunks are appended to use user message.\n   4. Final message is sent to LLM.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finanyan%2Fchatwithpdfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finanyan%2Fchatwithpdfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finanyan%2Fchatwithpdfs/lists"}