This is a basic RAG chatbot made using LangChain, Streamlit, FAISS, Cohere's embed-english-v3.0 and OpenAI's gpt-3.5-turbo or Cohere's command-r
Worked with Python 3.11
anything above will probably work.
- Clone the repo
git clone https://github.com/Anindyait/RAG-Basics.git
- Create and activate virtual environment
cd RAG-Basics
python -m venv .venv
.venv\Scripts\activate
- Install Requirements
pip install -r requirements.txt
- Go to
\.venv\Lib\site-packages\langchain_community\chat_models
Opencohere.py
and comment out the line"token_count": response.token_count,
- Create a
.env
file and put your Cohere API key as COHERE_API_KEY and OpenAI API key as OPENAI_API_KEY Cohere API Key and OpenAI API Key
OPENAI_API_KEY=[YOUR OPENAI API KEY GOES HERE]
COHERE_API_KEY=[YOUR COHERE API KEY GOES HERE]
The OPENAI_API_KEY is not used by default. The chatbot uses Cohere's embed-english-v3.0 and command-r by default.
- Run Chatbot.py
streamlit run .\Chatbot.py