{"id":27141357,"url":"https://github.com/bbs1412/qna_chatbot","last_synced_at":"2026-04-12T15:44:10.156Z","repository":{"id":286674420,"uuid":"962130892","full_name":"Bbs1412/QnA_ChatBot","owner":"Bbs1412","description":"Mini Project which uses Streamlit for UI and Langchain Ecosystem to implement LLM application. ","archived":false,"fork":false,"pushed_at":"2025-04-08T08:16:39.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T00:58:35.678Z","etag":null,"topics":["chatbot","groq","langchain","ollama","openai","python","qanda","streamlit"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Bbs1412.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-04-07T17:39:15.000Z","updated_at":"2025-04-08T08:16:43.000Z","dependencies_parsed_at":"2025-04-07T20:23:58.079Z","dependency_job_id":"19129d8b-8ed1-43b6-8437-588ddac140d0","html_url":"https://github.com/Bbs1412/QnA_ChatBot","commit_stats":null,"previous_names":["bbs1412/qna_chatbot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bbs1412%2FQnA_ChatBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bbs1412%2FQnA_ChatBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bbs1412%2FQnA_ChatBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bbs1412%2FQnA_ChatBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bbs1412","download_url":"https://codeload.github.com/Bbs1412/QnA_ChatBot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137941,"owners_count":21053775,"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","groq","langchain","ollama","openai","python","qanda","streamlit"],"created_at":"2025-04-08T06:48:59.756Z","updated_at":"2026-04-12T15:44:10.150Z","avatar_url":"https://github.com/Bbs1412.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QnA ChatBot using Langchain 🔗 and Streamlit\nA mini project that showcases a QnA-style LLM application built with Streamlit for UI and the Langchain ecosystem for LLM orchestration.\n\n\n## Index:\n- [Project Details](#-project-details)\n    - [Aim](#aim)\n    - [Features](#features)\n    - [Tech Stack](#tech-stack)\n- [Steps to run](#-steps-to-run)\n- [Future Improvements](#-future-improvements)\n- [Contributions](#-contributions)\n- [License](#-license)\n- [Contact](#-contact)\n\n\n## 🎯 Project Details:\n### Aim:\nTo provide an interactive chatbot interface that leverages the power of large language models (LLMs), allowing seamless provider switching and real-time response handling.  \nIt also serves as a way to apply my learnings from the Langchain ecosystem into a practical and useful project.\n\n\n### Features:\n\n+ 🔄 Switch between multiple LLM providers:\n    - OpenAI\n    - Groq\n    - Google\n    - Ollama (Local LLM)\n\n+ 🧠 Dynamically lists available models based on the selected provider.\n\n+ 🔎 Supports LangSmith tracing for better observability and debugging.\n\n- 🛠️ **Built using LangChain tools:**\n  - `ChatPromptTemplate`\n  - `ChatMessageHistory` + History Trimmer\n  - LangChain Expression Language (LCEL)\n  - `RunnablePassthrough`, `RunnableWithMessageHistory`\n  - `StringOutputParser`\n\n- 🚧 Change LLM provider and model **on the fly** with zero restarts.\n\n\n### Screenshot:\n\n- Choosing a provider:\n![Provider Selection Screenshot](./assets/1_choose_provider.png)\n\n- Dynamic model listing:\n![Dynamic Model Listing Screenshot](./assets/2_list_models.png)\n\n- Chatbot interface:\n![Chatbot Interface Screenshot](./assets/3_demo_chat.png)\n\n\n### Tech Stack:\n- **Frontend:** Streamlit  \n- **LLM Orchestration:** LangChain\n\n\n## 🚀 Steps to run:\n\n1. **Clone the repository:**\n    ```bash\n    git clone --depth 1 https://github.com/Bbs1412/QnA_ChatBot\n    ```\n    \n1. **Set up virtual environment:**\n    ```bash\n    cd QnA_ChatBot\n    python -m venv venv\n    \n    venv\\Scripts\\activate\n    # or\n    source venv/bin/activate\n\n    pip install -r requirements.txt\n    ```\n\n1. **Set the environment variables *(Optional)*:**\n   - Either create a `.env` file in the root directory:\n     ```env\n     OPENAI_API_KEY=your_openai_api_key\n     GROQ_API_KEY=your_groq_api_key\n     GEMINI_API_KEY=your_gemini_api_key\n     ```\n\n   - Or use Streamlit's config (`.streamlit/secrets.toml`):\n     ```toml\n     [OpenAI]\n     API_KEY = \"your_openai_api_key\"\n\n     [Groq]\n     API_KEY = \"your_groq_api_key\"\n\n     [Google]\n     API_KEY = \"your_google_api_key\"\n     ```\n      \n1. Run the app:\n    ```bash\n    streamlit run app.py\n    ```\n\n\n## 📈 Future Improvements:\n- Add sliders to let users control `temperature`, `max output tokens` and `context size` dynamically.\n- Ensure these parameters are only passed to the LLM when explicitly set by the user.\n- This avoids overriding the default values defined by some providers.\n- (e.g., certain Ollama models), which differ from standard defaults like `1`.\n- Add `Google` provider.\n\n## 🤝 Contributions:\n   Any contributions or suggestions are welcome! \n\n\n## 📜 License: \n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?logo=open-source-initiative)](LICENSE)\n\n- This project is licensed under the `MIT License`.\n- See the [LICENSE](LICENSE) file for details.\n\n\n## 📧 Contact:\n- **Email -** [bhushanbsongire@gmail.com](mailto:bhushanbsongire@gmail.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbs1412%2Fqna_chatbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbs1412%2Fqna_chatbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbs1412%2Fqna_chatbot/lists"}