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

when workflow_as_tool output files raise error #12060

Open
5 tasks done
hjlarry opened this issue Dec 25, 2024 · 1 comment · May be fixed by #12061
Open
5 tasks done

when workflow_as_tool output files raise error #12060

hjlarry opened this issue Dec 25, 2024 · 1 comment · May be fixed by #12061
Labels
🐞 bug Something isn't working

Comments

@hjlarry
Copy link
Contributor

hjlarry commented Dec 25, 2024

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.14.2

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

  1. create a workflow, make it output a file, then make it as a tool
  2. create another workflow, use the tool just created
  3. run the second workflow will raise error

✔️ Expected Behavior

No response

❌ Actual Behavior

[on_tool_error] Error: File.__init__() got an unexpected keyword argument 'dify_model_identity'

[NodeRunFailedEvent]
Node ID: 1735089354880
Node Title: 222
Type: tool
Error: Failed to invoke tool: File.__init__() got an unexpected keyword argument 'dify_model_identity'
Inputs: 
Process Data: 
Outputs: 

[GraphRunFailedEvent] reason: Failed to invoke tool: File.__init__() got an unexpected keyword argument 'dify_model_identity'

Debug panel:
e55381d24e385b2fc1c64421d51fa82

Copy link

dosubot bot commented Dec 25, 2024

The error you're encountering, File.__init__() got an unexpected keyword argument 'dify_model_identity', suggests that the File class's constructor does not accept dify_model_identity as a keyword argument. This is likely because dify_model_identity is defined as a class attribute rather than an instance attribute that should be passed during initialization.

In the Dify codebase, dify_model_identity is used as a class attribute to identify or categorize the model within the platform. It is not intended to be passed as an argument when creating an instance of the File class [1].

To resolve this issue, you should ensure that when creating instances of the File class, dify_model_identity is not included in the keyword arguments. Instead, it should be set as a class attribute, as it is already defined in the class itself. You might need to adjust the code where the File instances are being created to exclude this argument from the initialization process.

To continue talking to Dosu, mention @dosu.


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

@dosubot dosubot bot added the 🐞 bug Something isn't working label Dec 25, 2024
@hjlarry hjlarry linked a pull request Dec 25, 2024 that will close this issue
5 tasks
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

Successfully merging a pull request may close this issue.

1 participant