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

Workflow can not be published if it contains Agent node #12804

Open
5 tasks done
kurokobo opened this issue Jan 16, 2025 · 1 comment
Open
5 tasks done

Workflow can not be published if it contains Agent node #12804

kurokobo opened this issue Jan 16, 2025 · 1 comment
Labels
🐞 bug Something isn't working 🌊 feat:workflow Workflow related stuff.

Comments

@kurokobo
Copy link
Contributor

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-beta.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. Deploy fresh 1.0.0-beta.1 instance
  2. Install OpenAI plugin and configure API key
  3. Install Agent Strategy plugin
  4. Create new Workflow app
  5. Add and connect Agent node and End node
  6. Configure Agent node with minimum values
    Image
    Image
  7. Click Publish -> Publish

✔️ Expected Behavior

The App is published.

❌ Actual Behavior

No response with no error. The App is not published.
Internally, there is an error: TypeError: Cannot destructure property 'strategy' of 'a' as it is undefined.

Image

Copy link

dosubot bot commented Jan 16, 2025

The issue you're encountering seems to be related to the configuration of the 'Agent' node in your workflow. The error message TypeError: Cannot destructure property 'strategy' of 'a' as it is undefined suggests that the 'strategy' property is not being correctly set or accessed in the code.

Here are a few steps you can take to troubleshoot and potentially resolve this issue:

  1. Check Agent Node Configuration: Ensure that the 'Agent' node is correctly configured with all required parameters. The 'strategy' property should be set to one of the expected values: "function_call", "cot", or "react" [1].

  2. Verify Plugin Installation: Make sure that the Agent Strategy plugin is properly installed and configured. This includes verifying that the 'FunctionCalling' strategy is available and correctly set up in your environment.

  3. Review Code for Destructuring: The error indicates a problem with destructuring in the JavaScript code. Check the part of the code where the 'strategy' property is being accessed. Ensure that the object from which 'strategy' is being destructured is correctly initialized and contains the expected properties.

  4. Debugging: Add logging or debugging statements to the code to trace where the 'strategy' property is being set and accessed. This can help identify if and where the property is becoming undefined.

  5. Consult Documentation: Review the Dify documentation for any additional configuration steps or requirements for using the 'Agent' node and 'FunctionCalling' strategy [2].

By ensuring that the 'Agent' node is correctly configured and that the code handling the 'strategy' property is robust, you should be able to resolve the issue and successfully publish your workflow.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | 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 🌊 feat:workflow Workflow related stuff.
Projects
None yet
Development

No branches or pull requests

1 participant