mirror of
https://github.com/run-llama/create-llama.git
synced 2026-07-15 13:15:42 -04:00
mongodb not working with fast-api backend (0.1.35) #34
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @aadnegture on GitHub (Aug 15, 2024).
Originally assigned to: @thucpn on GitHub.
I'm not getting the mongodb integration to work with fast-api.
Poetry run generate runs without errors, but with this output:
Where 2272 is from adding a print of
store._collection.estimated_document_count()in the get_vector_store function. So the connection seems fine.When calling the api it doesn't retrieve any nodes at all:
8:[{"type": "sources", "data": {"nodes": []}}]the logs of the api looks like this:
@marcusschiesser commented on GitHub (Aug 19, 2024):
@aadnegture I guess that the metadata filters are not working with MongoDB. Can you please try:
in
chat.pyand let me know if that works?@marcusschiesser commented on GitHub (Aug 27, 2024):
@aadnegture the problem is that you need to create the index in MongoDB, see https://github.com/run-llama/llama_index/blob/332d2b9e71acefa166355760c4bf391aa1f3fa48/llama-index-integrations/vector_stores/llama-index-vector-stores-mongodb/llama_index/vector_stores/mongodb/base.py#L54-L72
This is currently not done automatically