Skip to content

fix: Fix an exception where incomplete parameters were generated by a large model when calling the Workflow Tool in the ai-chat node, resulting in missing parameters being thrown#6175

Open
wangliang181230 wants to merge 1 commit into
1Panel-dev:v2from
wangliang181230:PR/20-ToolWorkflow-default=None

Conversation

@wangliang181230
Copy link
Copy Markdown
Contributor

What this PR does / why we need it?

fix: Fix an exception where incomplete parameters were generated by a large model when calling the Workflow Tool in the ai-chat node, resulting in missing parameters being thrown

修复在 ai-chat 节点调用 工作流工具 时,大型模型生成不完整参数导致抛出缺失参数的异常

fixes #6172

Summary of your change

601990123-c424f38a-9088-4f8d-9705-8edbe54d1891

Please indicate you've done the following:

  • Made sure tests are passing and test coverage is added if needed.
  • Made sure commit message follow the rule of Conventional Commits specification.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed.

Comment thread apps/application/flow/tools.py Outdated
field.get("field"): (get_type(field.get("type")), Field(..., description=field.get("desc")))
field.get("field"): (
get_type(field.get("type")),
Field(..., required=True, description=field.get("desc")) if field.get("is_required") else Field(..., default=None, required=False, description=field.get("desc"))
Copy link
Copy Markdown
Contributor Author

@wangliang181230 wangliang181230 Jun 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is_requiredtrue 时,设置 required=True
is_requiredfalse 时,设置 required=False, default=None

… large model when calling the `Workflow Tool` in the `ai-chat` node, resulting in missing parameters being thrown
@wangliang181230 wangliang181230 force-pushed the PR/20-ToolWorkflow-default=None branch from 8558760 to 82f93b5 Compare June 3, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] AI 对话 节点调用工具时,当没有生成 工作流工具 的全部参数时,调用报错

1 participant