It is not very convenient to obtain parameters from the input when invoking tools in combination with business application scenarios #996

Closed
opened 2026-02-21 17:29:24 -05:00 by yindo · 4 comments
Owner

Originally created by @andylzming on GitHub (Jan 30, 2024).

Self Checks

Dify version

0.5.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Can the tool invocation obtain parameters from the query instead of from the input? Or, based on the question, dynamically display a form if input parameters are required?

123

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @andylzming on GitHub (Jan 30, 2024). ### Self Checks - [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 file this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). ### Dify version 0.5.2 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce Can the tool invocation obtain parameters from the query instead of from the input? Or, based on the question, dynamically display a form if input parameters are required? ![123](https://github.com/langgenius/dify/assets/21255047/7c6ba336-bbc1-47bf-98a0-e879fa48a0e9) ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 💪 enhancement🐞 bug labels 2026-02-21 17:29:24 -05:00
yindo closed this issue 2026-02-21 17:29:24 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 30, 2024):

🤖

Hello @andylzming, great to see you again! I hope you're having a good day. Let's dig into this issue you're facing with dify.

Thank you for your feedback and suggestion. Currently, in dify, parameters are obtained from the input when invoking tools through the validate_parameters method in the BuiltinToolProviderController class. This method takes in the tool name and a dictionary of tool parameters as arguments. You can find more details about this in the source code.

As for your suggestion about obtaining parameters from the query instead of from the input, this is not currently supported in dify. However, it's a valid suggestion and could potentially improve the flexibility of tool invocation.

Regarding your second suggestion about dynamically displaying a form based on the question, the current implementation of the ActivateForm in dify does not support this feature. The form fields are statically defined and include fields for name, password, interface language, and timezone. The form does not have a mechanism to dynamically add or remove fields based on a question. You can find more details about this in the source code.

However, it's worth noting that introducing such a feature would require significant changes to the current form implementation and might also require changes to the form validation and submission logic.

I hope this answers your questions. If you have any more questions or need further clarification, feel free to ask.

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@dosubot[bot] commented on GitHub (Jan 30, 2024): _🤖_ <!-- Greeting --> Hello @andylzming, great to see you again! I hope you're having a good day. Let's dig into this issue you're facing with dify. <!-- Answer --> Thank you for your feedback and suggestion. Currently, in dify, parameters are obtained from the input when invoking tools through the `validate_parameters` method in the `BuiltinToolProviderController` class. This method takes in the tool name and a dictionary of tool parameters as arguments. You can find more details about this in the [source code](https://github.com/langgenius/dify/blob/main/api/core/tools/provider/builtin_tool_provider.py). As for your suggestion about obtaining parameters from the query instead of from the input, this is not currently supported in dify. However, it's a valid suggestion and could potentially improve the flexibility of tool invocation. Regarding your second suggestion about dynamically displaying a form based on the question, the current implementation of the ActivateForm in dify does not support this feature. The form fields are statically defined and include fields for name, password, interface language, and timezone. The form does not have a mechanism to dynamically add or remove fields based on a question. You can find more details about this in the [source code](https://github.com/langgenius/dify/blob/main/web/app/activate/activateForm.tsx). However, it's worth noting that introducing such a feature would require significant changes to the current form implementation and might also require changes to the form validation and submission logic. I hope this answers your questions. If you have any more questions or need further clarification, feel free to ask. ## Sources - [api/core/tools/provider/builtin_tool_provider.py](https://github.com/langgenius/dify/blob/main/api/core/tools/provider/builtin_tool_provider.py) - [web/app/activate/activateForm.tsx](https://github.com/langgenius/dify/blob/main/web/app/activate/activateForm.tsx) - [api/controllers/console/workspace/tool_providers.py](https://github.com/langgenius/dify/blob/main/api/controllers/console/workspace/tool_providers.py) --- This response is meant to be useful and save you time. It is **not meant to be a precise solution**, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot.
Author
Owner

@takatost commented on GitHub (Jan 30, 2024):

We will provide a HTTP Request component in the workflow next month, which will be more convenient.

@takatost commented on GitHub (Jan 30, 2024): We will provide a HTTP Request component in the workflow next month, which will be more convenient.
Author
Owner

@github-actions[bot] commented on GitHub (Feb 15, 2024):

Close due to it's no longer active, if you have any questions, you can reopen it.

@github-actions[bot] commented on GitHub (Feb 15, 2024): Close due to it's no longer active, if you have any questions, you can reopen it.
Author
Owner

@andylzming commented on GitHub (Feb 20, 2024):

We will provide a HTTP Request component in the workflow next month, which will be more convenient.

Has this feature been implemented in the new version?

@andylzming commented on GitHub (Feb 20, 2024): > We will provide a HTTP Request component in the workflow next month, which will be more convenient. Has this feature been implemented in the new version?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#996