tool params not work as expected when develop a tool #4723

Closed
opened 2026-02-21 18:07:44 -05:00 by yindo · 1 comment
Owner

Originally created by @hjlarry on GitHub (Jul 22, 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).
  • 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.6.14

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

use following params to config a tool:

  - name: test_number
    type: number
    required: false
    label:
      en_US: Test Number
    min: 5
    placeholder:
      en_US: Please input a number between 5 and 10
      zh_Hans: 请输入一个介于 5 和 10 之间的数字
    form: llm
  - name: type
    type: select
    required: false
    label:
      en_US: search type
    form: llm
    placeholder:
      en_US: Please choose an option
    options:
      - value: sports
        label:
          en_US: sports
      - value: games
        label:
          en_US: games

simply because the form type is llm, it is all display as text.

✔️ Expected Behavior

7b637a5c491bb2fe5ea28981cb95069

Actual Behavior

10bf577a88e613f33973976cf155dc0

Originally created by @hjlarry on GitHub (Jul 22, 2024). ### 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] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.6.14 ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce use following params to config a tool: ``` - name: test_number type: number required: false label: en_US: Test Number min: 5 placeholder: en_US: Please input a number between 5 and 10 zh_Hans: 请输入一个介于 5 和 10 之间的数字 form: llm - name: type type: select required: false label: en_US: search type form: llm placeholder: en_US: Please choose an option options: - value: sports label: en_US: sports - value: games label: en_US: games ``` simply because the form type is `llm`, it is all display as text. ### ✔️ Expected Behavior ![7b637a5c491bb2fe5ea28981cb95069](https://github.com/user-attachments/assets/167cecfb-b624-4425-a1bf-fff209d25cf6) ### ❌ Actual Behavior ![10bf577a88e613f33973976cf155dc0](https://github.com/user-attachments/assets/b8ac33d3-0566-48ab-8034-86b437693f79)
yindo added the 🐞 bug label 2026-02-21 18:07:44 -05:00
yindo closed this issue 2026-02-21 18:07:44 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jul 22, 2024):

The tool parameters are not displaying correctly because parameters with the form type llm are meant to be inferred by the Agent and not displayed on the frontend. This is why they are not appearing as expected in your form.

For parameters to be displayed and filled in by the user on the frontend, you should use the form type form instead of llm. The llm form type is specifically designed for parameters that the Agent infers, and these parameters are not intended to be displayed or filled in by the user on the frontend [1][2][3][4].

Here is an example of how you can modify your configuration:

- name: test_number
  type: number
  required: false
  label:
    en_US: Test Number
  min: 5
  placeholder:
    en_US: Please input a number between 5 and 10
    zh_Hans: 请输入一个介于 5 和 10 之间的数字
  form: form  # Change from 'llm' to 'form'
- name: type
  type: select
  required: false
  label:
    en_US: search type
  form: form  # Change from 'llm' to 'form'
  placeholder:
    en_US: Please choose an option
  options:
    - value: sports
      label:
        en_US: sports
    - value: games
      label:
        en_US: games

This should ensure that the parameters are displayed correctly on the frontend.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Jul 22, 2024): <!-- Answer --> The tool parameters are not displaying correctly because parameters with the form type `llm` are meant to be inferred by the Agent and not displayed on the frontend. This is why they are not appearing as expected in your form. For parameters to be displayed and filled in by the user on the frontend, you should use the form type `form` instead of `llm`. The `llm` form type is specifically designed for parameters that the Agent infers, and these parameters are not intended to be displayed or filled in by the user on the frontend <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/core/tools/docs/en_US/tool_scale_out.md)</sup><sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/en/guides/tools/quick-tool-integration.md)</sup><sup>[[3]](https://github.com/langgenius/dify/blob/main/api/core/tools/docs/zh_Hans/tool_scale_out.md)</sup><sup>[[4]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/guides/tools/quick-tool-integration.md)</sup>. Here is an example of how you can modify your configuration: ```yaml - name: test_number type: number required: false label: en_US: Test Number min: 5 placeholder: en_US: Please input a number between 5 and 10 zh_Hans: 请输入一个介于 5 和 10 之间的数字 form: form # Change from 'llm' to 'form' - name: type type: select required: false label: en_US: search type form: form # Change from 'llm' to 'form' placeholder: en_US: Please choose an option options: - value: sports label: en_US: sports - value: games label: en_US: games ``` This should ensure that the parameters are displayed correctly on the frontend. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#4723