Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/montedev0516/ai-custom-chatbot
This project creates a chatbot that uses Langchain and APIs from OpenAI, Google, and Hugging Face. It lets users upload documents (txt, pdf, CSV, docx) and chat with their content to get accurate answers.
https://github.com/montedev0516/ai-custom-chatbot
Last synced: 25 days ago
JSON representation
This project creates a chatbot that uses Langchain and APIs from OpenAI, Google, and Hugging Face. It lets users upload documents (txt, pdf, CSV, docx) and chat with their content to get accurate answers.
- Host: GitHub
- URL: https://github.com/montedev0516/ai-custom-chatbot
- Owner: montedev0516
- Created: 2024-10-30T08:17:14.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-10-30T08:44:40.000Z (3 months ago)
- Last Synced: 2024-10-30T09:19:14.916Z (3 months ago)
- Language: Jupyter Notebook
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RAG chatbot powered by 🔗 Langchain, OpenAI, Google Generative AI and Hugging Face 🤗
RAG architecture with Langchain components.Although Large Language Models (LLMs) are powerful and capable of generating creative content, they can produce outdated or incorrect information as they are trained on static data. To overcome this limitation, Retrieval Augmented Generation (RAG) systems can be used to connect the LLM to external data and obtain more reliable answers.
The aim of this project is to build a RAG chatbot in Langchain powered by [OpenAI](https://platform.openai.com/overview), [Google Generative AI](https://ai.google.dev/?hl=en) and [Hugging Face](https://huggingface.co/) **APIs**. You can upload documents in txt, pdf, CSV, or docx formats and chat with your data. Relevant documents will be retrieved and sent to the LLM along with your follow-up questions for accurate answers.
Throughout this project, we examined each component of the RAG system from document loader to conversational retrieval chain. Additionally, we developed a user interface using [streamlit](https://streamlit.io/) application.
This project requires Python 3 and the following Python libraries installed:
`langchain` ,`langchain-openai`, `langchain-google-genai`, `chromadb`, `streamlit`, `streamlit`
The full list of requirements can be found in `requirements.txt`
To run the app locally:
1. Create a virtual environment: `python -m venv langchain_env`
2. Activate the virtual environment : `.\langchainenv\Scripts\activate` on Windows.
3. Run the following command in the directory: `cd RAG_Chatabot_Langchain`
4. Install the required dependencies `pip install -r requirements.txt`
5. Start the app: `streamlit run RAG_app.py`
6. In the sidebar, select the LLM provider (OpenAI, Google Generative AI or HuggingFace), choose an LLM (GPT-3.5, GPT-4, Gemini-pro or Mistral-7B-Instruct-v0.2), adjust its parameters, and insert your API keys.
7. Create or load a Chroma vectorstore.
8. Chat with your documents: ask questions and get 🤖 AI answers.I wrote a blog post about this project. You can find it [here](https://medium.com/@alaeddine.grine/rag-chatbot-powered-by-langchain-openai-google-generative-ai-and-hugging-face-apis-6a9b9d7d59db)