{"id":23992765,"url":"https://github.com/uditmahato/document_query_chatbot","last_synced_at":"2025-10-26T23:11:23.464Z","repository":{"id":270319445,"uuid":"909965363","full_name":"uditmahato/document_query_chatbot","owner":"uditmahato","description":"An interactive chatbot application built with Streamlit, utilizing Google’s Generative AI and Langchain for document-based Q\u0026A. The app allows users to upload text, PDF, or Word documents, interact with the content using AI, and book appointments through a conversational interface with input validation.","archived":false,"fork":false,"pushed_at":"2025-01-05T10:38:50.000Z","size":160,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-30T08:57:45.416Z","etag":null,"topics":["chatbot","gemini","generative-ai","langchain","streamlit-webapp"],"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/uditmahato.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":"2024-12-30T07:00:38.000Z","updated_at":"2025-03-28T12:11:32.000Z","dependencies_parsed_at":"2025-01-05T11:27:06.894Z","dependency_job_id":null,"html_url":"https://github.com/uditmahato/document_query_chatbot","commit_stats":null,"previous_names":["uditmahato/chat_bot","uditmahato/document_query_chatbot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/uditmahato/document_query_chatbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uditmahato%2Fdocument_query_chatbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uditmahato%2Fdocument_query_chatbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uditmahato%2Fdocument_query_chatbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uditmahato%2Fdocument_query_chatbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uditmahato","download_url":"https://codeload.github.com/uditmahato/document_query_chatbot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uditmahato%2Fdocument_query_chatbot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261352721,"owners_count":23146112,"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":["chatbot","gemini","generative-ai","langchain","streamlit-webapp"],"created_at":"2025-01-07T20:17:54.812Z","updated_at":"2025-10-26T23:11:18.414Z","avatar_url":"https://github.com/uditmahato.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Document Query Chatbot\n\nThis project implements an interactive chatbot using Streamlit, which allows users to upload text, PDF, or Word documents, query the document for information, and even book appointments via a conversational interface.\n\n## About the App\n\nThe **Interactive Chatbot with Document Upload** is designed to allow users to interact with documents in a conversational manner. The app extracts the text from uploaded files and enables users to ask questions or extract relevant information directly from the document. In addition to querying the document, the app provides users with the ability to book appointments by submitting their details through a simple chat interface.\n\nThis chatbot utilizes a combination of advanced natural language processing (NLP) techniques, machine learning, and document parsing libraries to deliver a smooth and efficient experience for the users.\n\n## Technologies Used\n\n1. **Streamlit**: The app's user interface is built using Streamlit, which allows rapid development of interactive web applications with Python. It is lightweight and easy to use for building data science and machine learning applications.\n   \n2. **Google Generative AI**: Integrated for advanced NLP tasks, such as understanding and responding to user queries. Google’s powerful language models are used to process and analyze the content extracted from uploaded documents.\n\n3. **LangChain**: This library is used to manage the flow of information between the document and the user queries. LangChain helps with document querying and retrieving the most relevant answers from the text.\n\n4. **Document Parsing Libraries**:\n   - **PyPDF2**: Used for extracting text from PDF documents.\n   - **python-docx**: Used for extracting text from Word documents.\n\n5. **Appointment Booking**: The app uses Python forms to collect user data (name, email, phone number, and preferred appointment date) and process appointment booking via the chatbot interface.\n\n6. **Python-dotenv**: Helps securely load environment variables, such as Google Cloud credentials, for the integration with Google APIs.\n\n7. **DateParser**: Used to handle date-related queries in the appointment booking system, ensuring proper date formatting and understanding user inputs.\n\n## Features\n\n* **Document Upload**: Users can upload text files, PDFs, or Word documents, and the system extracts text from them.\n* **Document Query**: After uploading, users can ask questions about the document, and the chatbot will attempt to provide relevant answers.\n* **Appointment Booking**: Users can provide their name, phone number, email, and preferred date for booking an appointment.\n\n## Prerequisites\n\nMake sure you have the following installed:\n* Python 3.7+\n* Google Cloud Service account credentials (for Google Generative AI integration)\n\n## Installation\n\n1. **Clone the Repository**:\n```bash\ngit clone https://github.com/uditmahato/chat_bot.git\ncd chat_bot\n```\n\n2. **Set Up a Virtual Environment** (optional but recommended):\n```bash\npython3 -m venv env\nsource env/bin/activate  # On Windows use `env\\Scripts\\activate`\n```\n\n3. **Install Dependencies**:\n```bash\npip install -r requirements.txt\n```\n\n4. **Set Up Google Cloud Credentials**:\n* Download your Google Cloud Service Account Key in JSON format.\n* Place the file in the .gitignore folder and set the environment variable `GOOGLE_APPLICATION_CREDENTIALS` to its path:\n```bash\nexport GOOGLE_APPLICATION_CREDENTIALS=\"/path/to/sharp-agent-392105-bf6377f9f1c7.json\"\n```\n\n## Running the Application\n\nAfter setting up the environment, you can run the application with:\n```bash\nstreamlit run app.py\n```\n\nVisit the URL provided in your terminal (typically http://localhost:8501/) to access the app.\n\n## Screenshots\n\n### App Interface\n![App Interface](images/a.png)\n\n### Appointment Booking\n![Appointment Booking](images/b.png)\n\n\n## Requirements\n\n```\nstreamlit==1.26.0\nlangchain==0.3.13\nlangchain-community==0.3.13\ngoogle-generative.ai==0.8.3\npydantic==2.10.4\nphonenumbers==8.13.52\nPyPDF2==3.0.1\npython-docx==1.1.2\ndateparser==1.2.0\nlangchain-google-genai==2.0.7\nfaiss-cpu==1.9.0\npydantic[email]\n\n```\n\n## Notes\n\n* If you encounter issues with Google API authentication, ensure that the `GOOGLE_APPLICATION_CREDENTIALS` environment variable is properly set.\n* To add more file types or modify the chatbot's behavior, you can adjust the respective functions in the code.\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuditmahato%2Fdocument_query_chatbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuditmahato%2Fdocument_query_chatbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuditmahato%2Fdocument_query_chatbot/lists"}