Skip to content
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

"tool invoke error: 'Document' object has no attribute 'doc_metadat'" #14590

Open
5 tasks done
adolf2024 opened this issue Mar 1, 2025 · 1 comment
Open
5 tasks done
Labels
🐞 bug Something isn't working

Comments

@adolf2024
Copy link

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

1.0.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

First: I create an [Knowledge],and import some md files, the content in the md files is chinese,
Then: I create an [Agent], using the [Knowledge],I can see the Knowledge shows me the correct answer, But the result shows me {用户之前遇到了调用工具时出现的错误:“tool invoke error: 'Document' object has no attribute 'doc_metadat'”。现在要继续处理初始问题“放门口”。
首先分析错误原因。可能是数据集工具在检索过程中出现结构问题,或者返回的数据格式不符合预期。比如“doc_metadat”应该是“doc_metadata”拼写错误?或者文档对象的元数据字段缺失了所需的信息。需要检查该工具的配置或数据集结构是否有误。}
Third: I have searched the whole code in the dify version 1.0.0, I can't find doc_metadat parameters, can you help me to solved it?Or is it a bug in the new versions?

✔️ Expected Behavior

Help to solve the problem.

❌ Actual Behavior

1 create a [Knowledge],using [High Quality], Embedding model using BAAI in [siliconflow], and [FULL Text Search] with [rerank],rerank using [BCE-Rerank] in [siliconflow],.
2 craete An Agent,using [siliconflow] deepseek R1.

Image Image
@dosubot dosubot bot added the 🐞 bug Something isn't working label Mar 1, 2025
Copy link

dosubot bot commented Mar 1, 2025

Hey there, @adolf2024! I'm here to assist you with bug fixes, answer your questions, and help you become a contributor. Let's tackle this issue together!

The error message you're encountering, "'Document' object has no attribute 'doc_metadat'", suggests a typo in the attribute name. The correct attribute name should be metadata, not doc_metadat. In the Dify codebase, the 'Document' object has the following attributes: page_content, vector, metadata, provider, and children [1].

To resolve this issue, you should check the part of your code or configuration where the 'Document' object is being accessed and ensure that you are using the correct attribute name metadata. If this error is occurring within a tool or plugin, you may need to update the tool's code to use the correct attribute name. If you have control over the code, correct the typo; otherwise, you might need to report this as a bug to the maintainers if it is part of the Dify codebase.

To continue talking to Dosu, mention @dosu.


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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant