-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Knowledge Retrieval with external knowledge base #9142
Comments
To resolve the "'NoneType' object has no attribute 'provider'" error when inserting "Knowledge Retrieval" in a workflow using Dify version 0.9.1, ensure that the if node_data.multiple_retrieval_config.reranking_mode == "reranking_model":
reranking_model = {
"reranking_provider_name": node_data.multiple_retrieval_config.reranking_model.provider,
"reranking_model_name": node_data.multiple_retrieval_config.reranking_model.model,
} Make sure that Additionally, review the |
@akkaz This error may be caused by not successfully configuring the Rerank Model but turning on the switch. We are working on fixing this issue. This feature can still be used normally. You can choose to temporarily turn off the rerank model switch, or configure an available rerank model. |
In my case, the issue occurred because the knowledge retrieval returned an empty value, despite the status being a successful 200. Upon reviewing the code, I identified a potential problem here:
Additionally, the documentation mentions that metadata should be a string (https://docs.dify.ai/zh-hans/guides/knowledge-base/external-knowledge-api-documentation), but in practice, the backend treats it as a dictionary ( dify/api/core/rag/models/document.py Line 18 in 3f1aa1f
After fixing these two points, everything is functioning correctly. However, regarding the first issue, simply commenting out that line might introduce other problems, so a more robust solution may be needed. |
For me also, enabling the rerank fixes the error, but always gives empty results. |
the cloud servcie has updated to the latest version ,pls try , thanks ~ |
"I see that your fix has been merged into the main branch, but the cloud service is using Version 0.9.1-fix1, and it seems that the fix hasn't been integrated yet." |
@JohnJyong I locally merged your fix branch into version 0.9.1, and so far the issue appears to be resolved. Thank you for the fix! |
Hello, thank you for bringing this issue to our attention. After reviewing it, it seems to be a frontend saving bug. For now, please try returning to the studio and then selecting the app. This should prevent the 'rerank model is required' issue from appearing. We'll address this bug in the next release. Thank you for your patience! |
Self Checks
Dify version
0.9.1
Cloud or Self Hosted
Cloud
Steps to reproduce
I successfully connect an external knowledge base with the new feature provided in 0.9.1.
I can also test the knowledge base, in the dedicated section and it works fine.
![image](https://private-user-images.githubusercontent.com/42849856/375173931-449b0787-fa29-4829-9d0a-8574a83894af.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MDIxNTEsIm5iZiI6MTczOTQwMTg1MSwicGF0aCI6Ii80Mjg0OTg1Ni8zNzUxNzM5MzEtNDQ5YjA3ODctZmEyOS00ODI5LTlkMGEtODU3NGE4Mzg5NGFmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDIzMTA1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU3YTZlYWQxYTU3OTVlOTA5Njk3NTIzZDE3ZDMzOTg5ZWIzZGI3M2M5NmE5NWZlYWNmZmViZWYxZDk2YjkwZGYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.414w5ypmeN1kt2_M3zKHBDlQZo9uXheOQSO0ZtyULvE)
When you try to insert the "Knowledge Retrieval" in a workwflow, you get this error
![image](https://private-user-images.githubusercontent.com/42849856/375173320-92781cd4-b513-4419-90a2-81c77dc83283.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MDIxNTEsIm5iZiI6MTczOTQwMTg1MSwicGF0aCI6Ii80Mjg0OTg1Ni8zNzUxNzMzMjAtOTI3ODFjZDQtYjUxMy00NDE5LTkwYTItODFjNzdkYzgzMjgzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDIzMTA1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJhZDFjY2E1YjJlMGI1MzYyM2ZkMmQ3ZDAzYzk5YjhkNjcxMzNlOGY4MGM1NWJjZjFmNzIzZThlY2YzOTkwYmImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.6d7mHxpFBYL3MwvjeXA_KdDBCklJQscBQOoL5Zud1ug)
✔️ Expected Behavior
No response
❌ Actual Behavior
No response
The text was updated successfully, but these errors were encountered: