TaskWeaver icon indicating copy to clipboard operation
TaskWeaver copied to clipboard

Example where we prompt for a specific input within a plugin

Open Netizine opened this issue 1 year ago • 2 comments

We have a use case where we have a plan with certain inputs, but I'm unsure how to add logic to requests for additional information from a user based on a certain logic flow.

It would be great if, in a plan, we could provide feedback to request certain information from the user. For example, we have a get prices plugin, but based on the number of possible prices (result in record count), we need to ask for certain filters from the user, such as country and report type, if we have more than three possible prices. If there are three or fewer, we can continue without asking for additional input.

I have tried putting the inputs as optional arguments, but they are only required based on a record count, so we may not have them when required, but I don't want to start the whole flow again.

It would be great if one of the sample plans prompted the user for additional information within the code to have a reference implementation where the decision to ask for additional information is handled within the plugin, and then the plan can continue.

Netizine avatar Jan 29 '24 06:01 Netizine

Hi @Netizine, we're currently working on this feature and please stay tuned. Thanks!

ShilinHe avatar Jan 29 '24 09:01 ShilinHe

We have also encountered the same scenario and look forward to your features!

Coderpsh avatar Feb 05 '24 02:02 Coderpsh