I have a simple Langchain chatbot using GPT4ALL that's being run in a singleton class within my Django server.
Here's the simple code:
gpt4all_path = './models/gpt4all_converted.bin'
llama_path = './models/ggml_model_q4_0.bin'
embeddings = LlamaCppEmbeddings(model_path=llama_path)
print("Initializing Index...")
vectordb = FAISS.from_documents(docs, embeddings)
print("Initialzied Index!!!")
This code runs fine when used inside the manage.py shell separately but the class instantiation fails to create a FAISS index with the same code. It keeps printing the llama_print_timings 43000ms
with the ms increasing on every print message.
Can someone help me out?