missing argument retriever_resources in api response #7582

Closed
opened 2026-02-21 18:21:20 -05:00 by yindo · 5 comments
Owner

Originally created by @chuncuidehei on GitHub (Jan 8, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.13.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

image
image
I have confirmed that the answer includes references from the original knowledge base documents, and the retriever_resource is enabled (set to true). However, the returned result does not contain the retriever_resource field.

✔️ Expected Behavior

Return the retriever_resource to me.

Actual Behavior

The actual behavior is that the retriever_resource field is missing in the returned result, even though it is enabled and the answer references the original knowledge base documents.

Originally created by @chuncuidehei on GitHub (Jan 8, 2025). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.13.2 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ![image](https://github.com/user-attachments/assets/7219073a-a278-4553-898d-6566fe74129f) ![image](https://github.com/user-attachments/assets/80a18843-38f6-4d91-aca2-20fa3a3ad2c2) I have confirmed that the answer includes references from the original knowledge base documents, and the retriever_resource is enabled (set to true). However, the returned result does not contain the retriever_resource field. ### ✔️ Expected Behavior Return the retriever_resource to me. ### ❌ Actual Behavior The actual behavior is that the retriever_resource field is missing in the returned result, even though it is enabled and the answer references the original knowledge base documents.
yindo added the 🐞 buggood first issuestale labels 2026-02-21 18:21:20 -05:00
yindo closed this issue 2026-02-21 18:21:20 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 8, 2025):

@chuncuidehei Hello there! I'm here to help you with any bugs, questions, or contributions you might have. Let me know how I can assist you!

The issue you're experiencing with the missing retriever_resources field in the API response, despite it being enabled, could be related to several factors:

  1. Configuration Check: Ensure that the retriever_resource configuration is correctly set to {"enabled": True}. This setting is crucial for including the retriever_resources field in the response [1].

  2. Code Logic: The logic that determines when the retriever_resources field is included might not be triggering correctly. This could be due to conditions in the codebase that aren't being met, such as the absence of retrieved resources during the message processing.

  3. Recent Changes: Be aware of recent changes in version 0.13.2 that might affect this behavior. The migration script allows certain fields in the dataset_retriever_resources table to be nullable, which might impact how resources are retrieved and included in the response [2].

  4. Error Handling: Check if there are any error logs or messages that might indicate why the retriever_resources field is not being included. The system should have mechanisms to handle and log such discrepancies [3].

  5. Self-Hosted Specifics: Ensure that your self-hosted environment is correctly configured and that there are no environment-specific settings affecting the inclusion of the retriever_resources field.

Review these aspects to identify any misconfigurations or logic issues that might be causing the retriever_resources field to be omitted from the response.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot[bot] commented on GitHub (Jan 8, 2025): <!-- Greeting --> @chuncuidehei Hello there! I'm here to help you with any bugs, questions, or contributions you might have. Let me know how I can assist you! <!-- Answer --> The issue you're experiencing with the missing `retriever_resources` field in the API response, despite it being enabled, could be related to several factors: 1. **Configuration Check**: Ensure that the `retriever_resource` configuration is correctly set to `{"enabled": True}`. This setting is crucial for including the `retriever_resources` field in the response <sup>[[1]](https://github.com/langgenius/dify/blob/main/web/app/components/develop/template/template_advanced_chat.en.mdx)</sup>. 2. **Code Logic**: The logic that determines when the `retriever_resources` field is included might not be triggering correctly. This could be due to conditions in the codebase that aren't being met, such as the absence of retrieved resources during the message processing. 3. **Recent Changes**: Be aware of recent changes in version 0.13.2 that might affect this behavior. The migration script allows certain fields in the `dataset_retriever_resources` table to be nullable, which might impact how resources are retrieved and included in the response <sup>[[2]](https://github.com/langgenius/dify/blob/main/api/migrations/versions/2024_09_24_0922-6af6a521a53e_update_retrieval_resource.py)</sup>. 4. **Error Handling**: Check if there are any error logs or messages that might indicate why the `retriever_resources` field is not being included. The system should have mechanisms to handle and log such discrepancies <sup>[[3]](https://github.com/langgenius/dify/blob/main/api/core/app/app_config/features/retrieval_resource/manager.py)</sup>. 5. **Self-Hosted Specifics**: Ensure that your self-hosted environment is correctly configured and that there are no environment-specific settings affecting the inclusion of the `retriever_resources` field. Review these aspects to identify any misconfigurations or logic issues that might be causing the `retriever_resources` field to be omitted from the response. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/59fe080e-090f-4e54-aa8f-aec37e9a8b95?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/59fe080e-090f-4e54-aa8f-aec37e9a8b95?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/59fe080e-090f-4e54-aa8f-aec37e9a8b95?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/59fe080e-090f-4e54-aa8f-aec37e9a8b95?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/59fe080e-090f-4e54-aa8f-aec37e9a8b95?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/59fe080e-090f-4e54-aa8f-aec37e9a8b95?feedback_type=other)</sup>
Author
Owner

@n3A87 commented on GitHub (Jan 9, 2025):

图片
最新版本是有的吧

@n3A87 commented on GitHub (Jan 9, 2025): ![图片](https://github.com/user-attachments/assets/98c7ce40-67c6-4d1d-8496-730c7c491e03) 最新版本是有的吧
Author
Owner

@chuncuidehei commented on GitHub (Jan 20, 2025):

图片 最新版本是有的吧

还没升级到最新版本,用的1.32版本,试了几个智能体都没有

@chuncuidehei commented on GitHub (Jan 20, 2025): > ![图片](https://github.com/user-attachments/assets/98c7ce40-67c6-4d1d-8496-730c7c491e03) 最新版本是有的吧 还没升级到最新版本,用的1.32版本,试了几个智能体都没有
Author
Owner

@jiandanfeng commented on GitHub (Jan 23, 2025):

The latest version(0.15.2) I use does not have this problem.

Image

@jiandanfeng commented on GitHub (Jan 23, 2025): The latest version(0.15.2) I use does not have this problem. ![Image](https://github.com/user-attachments/assets/3c56f439-6386-4157-89cc-32c178c8eb8c)
Author
Owner

@dosubot[bot] commented on GitHub (Feb 23, 2025):

Hi, @chuncuidehei. I'm Dosu, and I'm helping the Dify team manage their backlog and am marking this issue as stale.

Issue Summary

  • You reported a missing retriever_resource field in the API response for Dify version 0.13.2 in a self-hosted Docker setup.
  • I suggested checking various configurations and logs to troubleshoot.
  • "n3A87" and "jiandanfeng" noted that the issue does not occur in version 0.15.2.
  • You confirmed that you have not yet upgraded to the latest version.
  • Upgrading to version 0.15.2 resolves the issue.

Next Steps

  • Please confirm if this issue is still relevant to the latest version of the Dify repository. If so, you can keep the discussion open by commenting on this issue.
  • Otherwise, this issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Feb 23, 2025): Hi, @chuncuidehei. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog and am marking this issue as stale. **Issue Summary** - You reported a missing `retriever_resource` field in the API response for Dify version 0.13.2 in a self-hosted Docker setup. - I suggested checking various configurations and logs to troubleshoot. - "n3A87" and "jiandanfeng" noted that the issue does not occur in version 0.15.2. - You confirmed that you have not yet upgraded to the latest version. - Upgrading to version 0.15.2 resolves the issue. **Next Steps** - Please confirm if this issue is still relevant to the latest version of the Dify repository. If so, you can keep the discussion open by commenting on this issue. - Otherwise, this issue will be automatically closed in 15 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7582