Hey @Logan M, sorry to keep bugging you. I have implemented cloud qdrant. It's working. But the performance is getting worse than before.
def get_qdrant_index():
client = get_qdrant_client()
# load the documents and create the index
documents = SimpleDirectoryReader("data").load_data()
vector_store = QdrantVectorStore(client=client, collection_name="serraventura_cv")
storage_context = StorageContext.from_defaults(vector_store=vector_store)
index = VectorStoreIndex.from_documents(
documents,
storage_context=storage_context,
)
return index
To give some context. I'm trying to build an API using uvicorn and FastAPI.
My docker CMD
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "9090"]
Is there any problem with uvicorn/fastAPI to work with LlamaIndex?Because locally, without using both(uvicorn/fastAPI) just executing the script it takes 5 seconds. When I'm using uvicorn/fastAPI it takes 5 mins or more.
My logs from my docker:
ort_config.json: 100%|ββββββββββ| 1.27k/1.27k [00:00<00:00, 1.62MB/s]
config.json: 100%|ββββββββββ| 740/740 [00:00<00:00, 1.62MB/s]
special_tokens_map.json: 100%|ββββββββββ| 695/695 [00:00<00:00, 1.71MB/s]
tokenizer_config.json: 100%|ββββββββββ| 1.24k/1.24k [00:00<00:00, 2.63MB/s]
.gitattributes: 100%|ββββββββββ| 1.52k/1.52k [00:00<00:00, 2.77MB/s]
vocab.txt: 100%|ββββββββββ| 232k/232k [00:00<00:00, 2.77MB/s]s]
tokenizer.json: 100%|ββββββββββ| 711k/711k [00:00<00:00, 2.22MB/s]
model_optimized.onnx: 100%|ββββββββββ| 218M/218M [00:10<00:00, 20.9MB/s]
Fetching 8 files: 100%|ββββββββββ| 8/8 [00:11<00:00, 1.41s/it]15.9MB/s]
2024-04-02 17:56:39 INFO: Started server process [1]
2024-04-02 17:56:39 INFO: Waiting for application startup.
2024-04-02 17:56:39 INFO: Application startup complete.
2024-04-02 17:56:39 INFO: Uvicorn running on http://0.0.0.0:9090 (Press CTRL+C to quit)