Negotiate Function Call Parameters

tl;dr - When the function call arguments are complex, assistant should be able to interact to user in order to adjust its parameters
I need my assistant to schedule an appointment via function calling.
Since the available date/times are available on a external database, I’m using a crontab format in my function call specification, and then search db for available times which correspond to the given crontab.
The problem is sometimes the given crontab is too broad (giving too many options), or so narrow it has no available times. The assistant then should be able to talk to user in order adjust the crontab.
I don’t know if there is a better strategy to deal with this, but in any case my suggestion is a new state for assistant, just like action_required but for the talking user.
Thanks in advance!

It might be helpful to see some of the code to get a better idea of what you’re doing, but based on what you describe, here are a few ideas.

Add in your Assistant’s instructions a definition of what it means for the crontab to be “too broad” or “too narrow”, and tell it to ask the user for more information in those cases. You’ll have to specify how the Assistant should “…talk to user in order adjust the crontab”. Although this behavior is probably self evident to you, the Assistant still needs direction to do the right thing.

Here’s a suggestion, when the function call is invoked and no date/times are submitted, show a calendar with available date and times to make it easier for your user. when the user selects from the calendar, it will be submitted as if they typed the date and time in the chat’s input.

1 Like