In the name of ALLAH, who has guided me to do this work
A conversational bot which impersonates Aljazeera English news Channel. Scraped a few pages from Aljazeera news website and fed it to LlaMA 2 using RAG. Pinecone is used as vector database.
LlaMA 2 7b Model GGUF file 7 GB
MODEL_PATH = "D:\\path\\to\\folder\\llama-2-7b-chat.Q8_0.gguf"
$ pip install -r requirements.txt
Signup to Pinecone and create a index with the name llama7bnewsbot
. The dimensions of index are 4096
and metric euclidean
.
After index is created place environment variables on your system as PINECONE_API_KEY
and PINECONE_ENVIRONMENT
. These environment variables are used by pinecone client.
I have filled pinecone vector database using the news from Aljazeera channel english website. You can change the date for which you want to download the news for. To fill Pinecone database run.
python llama_cpu.py
That will download news from website and then fill them inside Pinecone vector database.
$ uvicorn api:app
Open browser and navigate to URL
http://127.0.0.1:8000/frontend/index.html
Atleast a good 6 core CPU. 12 GB of free RAM.