{"id":20056773,"url":"https://github.com/arnabsaha7/chatbot-with-llm_rag","last_synced_at":"2026-05-05T10:34:14.696Z","repository":{"id":247332067,"uuid":"825563876","full_name":"arnabsaha7/Chatbot-with-LLM_RAG","owner":"arnabsaha7","description":"Chatbot with OpenAI, FAISS, and Langchain","archived":false,"fork":false,"pushed_at":"2024-07-08T05:26:17.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-12T21:43:57.614Z","etag":null,"topics":["faiss","langchain","openai-api","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/arnabsaha7.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-07-08T05:00:15.000Z","updated_at":"2024-11-18T15:26:19.000Z","dependencies_parsed_at":"2024-07-09T15:16:38.879Z","dependency_job_id":null,"html_url":"https://github.com/arnabsaha7/Chatbot-with-LLM_RAG","commit_stats":null,"previous_names":["arnabsaha7/chatbot-with-llm_rag"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnabsaha7%2FChatbot-with-LLM_RAG","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnabsaha7%2FChatbot-with-LLM_RAG/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnabsaha7%2FChatbot-with-LLM_RAG/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnabsaha7%2FChatbot-with-LLM_RAG/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arnabsaha7","download_url":"https://codeload.github.com/arnabsaha7/Chatbot-with-LLM_RAG/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241484548,"owners_count":19970308,"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":["faiss","langchain","openai-api","streamlit"],"created_at":"2024-11-13T12:56:17.794Z","updated_at":"2026-05-05T10:34:14.667Z","avatar_url":"https://github.com/arnabsaha7.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Streamlit Chatbot with OpenAI, FAISS, \u0026 Langchain 🦜️🔗\n\nThis repository contains a Streamlit application for a chatbot that utilizes OpenAI's language model, FAISS for document retrieval, and Langchain for managing conversation chains. The chatbot engages in conversations and retrieves relevant documents based on the user's input.\n\n\n## Features\n\n- **OpenAI Language Model:** Provides natural language understanding and generation.\n- **FAISS for Document Retrieval:** Efficiently retrieves relevant documents based on user queries.\n- **Langchain for Conversation Management:** Manages conversation chains with memory capabilities.\n- **Conversation History:** Maintains conversation history within the session.\n- **Customizable UI:** Includes custom CSS for enhanced user experience.\n\n## Setup\n\n### Prerequisites\n\n\u003e- Python 3.11+\n\u003e- Streamlit\n\u003e- OpenAI API key\n\u003e- LangChain\n\u003e- FAISS library\n\n### Installation\n\n1. **Clone the repository:**\n\n    ```bash\n    git clone https://github.com/arnabsaha7/Chatbot-with-LLM_RAG.git\n    cd Chatbot-with-LLM_RAG\n    ```\n\n2. **Install the required packages:**\n\n    ```bash\n    pip install -r requirements.txt\n    ```\n\n3. **Set up your OpenAI API key:**\n\n    Replace the placeholder API key in the code with your actual OpenAI API key.\n\n    ```python\n    os.environ[\"OPENAI_API_KEY\"] = \"your-openai-api-key\"\n    ```\n\n4. **Prepare the FAISS index and documents:**\n\n    Ensure you have the FAISS index (`faiss_index_1`) and documents file (`documents.json`) in the project directory.\n\n## Running the Application\n\n1. **Start the Streamlit app:**\n\n    ```bash\n    streamlit run app.py\n    ```\n\n2. **Open your browser:**\n\n    The application will be available at `http://localhost:8501`.\n\n## Usage\n\n- `Welcome Screen:` The app starts with a welcome screen. You can begin interacting with the chatbot by typing your message in the input box.\n\n- `Conversation History:` The conversation history is displayed on the screen. User messages are shown in one style, while the bot's responses are shown in another.\n\n- `Document Retrieval:` When you send a message, the chatbot retrieves relevant documents from the FAISS index and uses them to provide a more informed response.\n\n- `Reset Conversation:` Use the \"Reset Conversation\" button to clear the conversation history and start a new session.\n\n## File Structure\n\n- `Chatbot.py` --\u003e   The main Streamlit application file.\n- `requirements.txt` --\u003e   Lists all Python dependencies.\n- `faiss_index_1` --\u003e   The FAISS index file.\n- `documents.json` --\u003e   JSON file containing documents with metadata.\n- `styles.css` --\u003e   Custom CSS for styling the app.\n\n## Acknowledgements\n\n- [OpenAI](https://www.openai.com/)\n- [FAISS](https://github.com/facebookresearch/faiss.git)\n- [Streamlit](https://www.streamlit.io/)\n- [Langchain](https://github.com/langchain-ai/langchain.git)\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request.\n\n## Contact\n\nFor any questions or inquiries, please contact [Email](arnabsaha9786@gmail.com).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnabsaha7%2Fchatbot-with-llm_rag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farnabsaha7%2Fchatbot-with-llm_rag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnabsaha7%2Fchatbot-with-llm_rag/lists"}