I have an AI Agent and he have a mission to achieve from the call , i gave him a time limit(few minutes) - if the agent didn’t achieved the goal in the given time he need to ask the user for a permission to continue the interview and act accordingly.
I was trying to tackle this issue but could not find solution, I wonder if someone already done it and can help me here thanks!
Worth to mention that i’m aware of ‘functions’ capability of chatGPT but I’m looking for other ways to solve it.
So when you give the agent the mission and time limit, the timer starts.
Every time the agent do some task it checks the time elapsed based from the start time. If not yet the limit, continue. If exceeded, prompt the user.
Do you have this kind of flow in your code?
Thanks for the response! @supershaneski
Generally yes that’s what I did, but the problem is that after the time exceeded i want to prompt and ask the user for time extension and than I need to somehow identify that he agreed and increase the time left for the interview - is there any best practices for this issue?
How about just popping up a yes/no dialog? No need to run another API call. Just write a good generic message for the dialog.
@supershaneski So i don’t want to implement it that way - since i want to achieve this via the call and not from yes/no dialog, any other ideas?
So let say the time limit is reached, you prompt the user with some message to ask them what to do via chat. They respond, then you process it using Chat APIs function calling
to somehow identify that he agreed. If the function call returns yes, you extend the time and continue processing. If it returns no, process stops and Chat API returns message that says so. The problem is what if they do not respond to the initial prompt asking if they want to ask for time extension since we used the chat interface to ask them? They can write anything.