Custom Chatbot Langchain (FREE)
In case you don't have a powerful computer for GPU, use the colab link above, and make sure you are using the T4 GPU on Google Collab.
Check Out The Colab Project
Make a bot that answers question from your txt file. Human like responses, and accurate using the llama 7B. Everything in this is free. I have added a short txt file that has some few stuffs about the university of Iceland, and can answer few questions based on that txt file.
-
Clone Repository:
git clone https://github.com/Cyboghostginx/Custom-Chatbot-Langchain-FREE-.git cd Custom-Chatbot-Langchain-FREE-
-
Ollama Installation:
curl https://ollama.ai/install.sh | sh ollama run llama2
-
Langchain Installation:
pip install git+https://github.com/langchain-ai/langchain.git@8d6faf56657070137a16669bc2420a08a5ab7f24#subdirectory=libs/langchain
-
Tiktoken Installation:
pip install tiktoken
-
FastEmbed Installation:
pip install fastembed
-
Qdrant-Client Installation:
pip install qdrant-client
python bot.py
I used a macbook pro m1, 16gb ram for this.
Splitting tx into chunks - Almost instantly
Embedding finished in 1.6 seconds
Similarity search - Almost instantly
Chat model response - 20 seconds for the the llama 7b model.
Note that when this is hosted on a better gpu, the chat model to would respond almost immediately. Thanks!