{"id":35028753,"url":"https://github.com/devdoshi19/chatbot_using_basic_langchain","last_synced_at":"2026-05-06T13:09:36.572Z","repository":{"id":330128191,"uuid":"1121658579","full_name":"DevDoshi19/ChatBot_using_Basic_LangChain","owner":"DevDoshi19","description":"A professional AI Chatbot built with LangChain and Google Gemini, featuring a custom UI using Streamlit.","archived":false,"fork":false,"pushed_at":"2025-12-23T11:56:44.000Z","size":6420,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-25T01:00:20.358Z","etag":null,"topics":["chat-application","chatbot","gemini-api","generative-ai","langchain","python","python3","streamlit"],"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/DevDoshi19.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-23T10:42:39.000Z","updated_at":"2025-12-24T15:12:45.000Z","dependencies_parsed_at":"2025-12-25T01:00:30.492Z","dependency_job_id":null,"html_url":"https://github.com/DevDoshi19/ChatBot_using_Basic_LangChain","commit_stats":null,"previous_names":["devdoshi19/chatbot_using_basic_langchain"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/DevDoshi19/ChatBot_using_Basic_LangChain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevDoshi19%2FChatBot_using_Basic_LangChain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevDoshi19%2FChatBot_using_Basic_LangChain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevDoshi19%2FChatBot_using_Basic_LangChain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevDoshi19%2FChatBot_using_Basic_LangChain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DevDoshi19","download_url":"https://codeload.github.com/DevDoshi19/ChatBot_using_Basic_LangChain/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevDoshi19%2FChatBot_using_Basic_LangChain/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32695051,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T08:33:17.875Z","status":"ssl_error","status_checked_at":"2026-05-06T08:33:17.221Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["chat-application","chatbot","gemini-api","generative-ai","langchain","python","python3","streamlit"],"created_at":"2025-12-27T06:45:41.403Z","updated_at":"2026-05-06T13:09:36.567Z","avatar_url":"https://github.com/DevDoshi19.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"left\"\u003e🤖 Gemini-Powered Chatbot (LangChain + Streamlit)\u003c/h1\u003e\r\n\r\n###\r\n\r\n\u003ch3 align=\"left\"\u003e\r\n🧠 A basic AI chatbot built using \u003cstrong\u003eLangChain\u003c/strong\u003e and \u003cstrong\u003eGoogle Gemini\u003c/strong\u003e\u003cbr\u003e\r\n⚡ Features real-time streaming responses and session-based memory\u003cbr\u003e\r\n🧩 Clean separation between UI and LLM logic\r\n\u003c/h3\u003e\r\n\r\n###\r\n\r\n\u003cbr clear=\"both\"\u003e\r\n\r\n\u003cdiv align=\"center\"\u003e\r\n  \u003cimg height=\"200\" src=\"https://media.giphy.com/media/qgQUggAC3Pfv687qPC/giphy.gif\" /\u003e\r\n\u003c/div\u003e\r\n\r\n---\r\n\r\n## 📁 Project Structure\r\n\r\n```\r\n\r\n.\r\n├── app.py                  # Streamlit UI\r\n├── chatbot_stremlit.py     # LangChain + Gemini logic\r\n├── requirements.txt\r\n├── .gitignore\r\n├── README.md\r\n└── .env                    # API keys (created by user)\r\n\r\n````\r\n\r\n---\r\n\r\n## 🌟 Key Features\r\n\r\n- 🧠 **Session-based Conversational Memory**  \r\n  Maintains chat history using `st.session_state`\r\n\r\n- ⚡ **Streaming Responses**  \r\n  Uses LangChain `.stream()` for live output\r\n\r\n- 🧩 **Clean Architecture**\r\n  - `chatbot_stremlit.py` → AI logic  \r\n  - `app.py` → UI and interaction  \r\n\r\n- 🔐 **Secure API Management**  \r\n  Uses `.env` file with `python-dotenv`\r\n\r\n---\r\n\r\n\u003cdiv align=\"center\"\u003e\r\n  \u003cimg height=\"200\" src=\"https://media.giphy.com/media/jBOOXxSJfG8kqMxT11/giphy.gif\" /\u003e\r\n\u003c/div\u003e\r\n\r\n---\r\n\r\n## 🛠️ Tech Stack\r\n\r\n- **Language:** Python 3.10+\r\n- **LLM:** Google Gemini (`gemini-2.5-flash-lite`)\r\n- **Frameworks:** LangChain (LCEL), Streamlit\r\n- **Utilities:** python-dotenv\r\n\r\n---\r\n\r\n## 🚀 Complete Setup Guide\r\n\r\n### 1️⃣ Clone the Repository\r\n\r\n```bash\r\ngit clone https://github.com/DevDoshi19/ChatBot_using_Basic_LangChain.git\r\n````\r\n\r\n---\r\n\r\n### 2️⃣ (Optional) Create Virtual Environment\r\n\r\n```bash\r\npython -m venv venv\r\nsource venv/bin/activate      # macOS / Linux\r\nvenv\\Scripts\\activate         # Windows\r\n```\r\n\r\n---\r\n\r\n### 3️⃣ Install Dependencies\r\n\r\n```bash\r\npip install -r requirements.txt\r\n```\r\n\r\n---\r\n\r\n### 4️⃣ Create `.env` File\r\n\r\nCreate a file named **`.env`** in the root directory.\r\n\r\n```env\r\nGOOGLE_API_KEY=your_google_gemini_api_key_here\r\n```\r\n\r\n⚠️ Never commit `.env` to GitHub.\r\n\r\n---\r\n\r\n### 5️⃣ Run the App\r\n\r\n```bash\r\nstreamlit run app.py\r\n```\r\n\r\nThe chatbot will open in your browser.\r\n\r\n---\r\n\r\n## 🧠 How It Works (High-Level)\r\n\r\n```\r\nUser → Streamlit UI → LangChain Prompt\r\n     → Gemini Model → Streamed Response\r\n```\r\n\r\n* Chat history is injected using `MessagesPlaceholder`\r\n* Responses stream live using `st.write_stream`\r\n* Memory persists within the session\r\n\r\n---\r\n\r\n## 📦 requirements.txt (Example)\r\n\r\n```txt\r\nstreamlit\r\nlangchain\r\nlangchain-google-genai\r\npython-dotenv\r\n```\r\n\r\n---\r\n\r\n## 🧠 What I Learned\r\n\r\n* Using **LangChain Expression Language (LCEL)**\r\n* Handling Streamlit reruns via **Session State**\r\n* Implementing **real-time LLM streaming**\r\n* Structuring AI apps cleanly and scalably\r\n\r\n---\r\n\r\n## 👨‍💻 Author\r\n\r\n**Dev Doshi**\r\nB.Tech | AI / ML | LangChain | Streamlit | Generative AI\r\n\r\n---\r\n\r\n## 🔗 Let’s Connect\r\n\r\n\u003cdiv align=\"left\"\u003e\r\n  \u003ca href=\"https://www.linkedin.com/in/dev-doshi-8360a727b\" target=\"_blank\"\u003e\r\n    \u003cimg src=\"https://raw.githubusercontent.com/maurodesouza/profile-readme-generator/master/src/assets/icons/social/linkedin/default.svg\" width=\"52\" height=\"40\" /\u003e\r\n  \u003c/a\u003e\r\n\u003c/div\u003e\r\n\r\n---\r\n## 🚀 Demo\r\n\r\n\r\nhttps://github.com/user-attachments/assets/6d8c7f3a-f731-4fb2-8406-1e566a351270\r\n\r\n\r\n---\r\n\r\n⭐ If you found this useful, consider starring the repository.\r\n\r\n```\r\nThank you for reading\r\n```\r\n\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevdoshi19%2Fchatbot_using_basic_langchain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevdoshi19%2Fchatbot_using_basic_langchain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevdoshi19%2Fchatbot_using_basic_langchain/lists"}