You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @dajianguo! 👋 I'm here to help you with any bugs, questions, or contributions you have for Dify. Let's squash those bugs together!
The issue you're experiencing with external knowledge retrieval being empty when the document table is empty in the self-hosted Dify version 0.9.1 is due to how the _fetch_dataset_retriever method operates. This method relies on the presence of documents in the Document table to determine available datasets. It uses a subquery to count the number of available documents for each dataset, and only datasets with a non-zero document count are considered for retrieval. If the document table is empty, the subquery will not find any datasets with available documents, resulting in an empty retrieval result [1].
To resolve this, ensure that there are documents in the Document table or adjust the logic to handle cases where the document table might be empty but external datasets should still be considered.
Self Checks
Dify version
0.9.1
Cloud or Self Hosted
Self Hosted (Source)
Steps to reproduce
I use a external knowledge,but in the chatflow, but don't retrival anything.
Because of the document table is empty when use the external data
set.
✔️ Expected Behavior
knowledge can retrival results
❌ Actual Behavior
knowledge retrival empty
The text was updated successfully, but these errors were encountered: