dify icon indicating copy to clipboard operation
dify copied to clipboard

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

Open andylzming opened this issue 2 years ago • 2 comments

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

andylzming avatar Jan 30 '24 06:01 andylzming

🤖

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] avatar Jan 30 '24 06:01 dosubot[bot]

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

takatost avatar Jan 31 '24 03:01 takatost

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

github-actions[bot] avatar Feb 16 '24 03:02 github-actions[bot]

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 avatar Feb 20 '24 07:02 andylzming