User
cdsuze
2h
Hello there,
I successfully use the assistants API with function calls to process user requests. In my use case, they ask to register the clock-out time using natural language.
Now, I have two scenarios that I haven’t been able to identify how to develop, and also couldn’t find something in the forum:
Before I store the information in the DB, I need to ask the user for a confirmation (example: Do you want to register Today 11pm? Confirm with yes or no). The key point is, I show the data to register and then ask for confirmation. How do I manage this step?
I’m using assistant API and threads.
This is my function now:
{
“type”: “function”,
“function”: {
“name”: “registerClockOut”,
“description”: “Register the exit time of a user on current or previous day”,
“parameters”: {
“type”: “object”,
“properties”: {
“clockOutTime”: {
“type”: “string”,
“pattern”: “^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$”, // YYYY-MM-DD HH:mm format
“description”: “Clock-out time like 2023-12-24 23:05”
}
},
“required”: [“clockOutTime”]
}
}
}