I am writing an assistant that helps users get information about an online role-playing game. A user might have one or more characters in the game. I have a function that the assistant can call if a user asks, for example, “What can you tell me about John Smith?”. However, if the user doesn’t have a character called John Smith, or the user asks, “What can you tell me about John?” the assistant makes the function call multiple times (I didn’t count, but I would guess maybe ten times) before giving up.
Is there a way to return an error code or text that will tell the assistant to reply to the user that it couldn’t find the character they are looking for, or to ask the user for more information?