Closed xiaokang00010 closed 4 months ago
I found that it is directly related to the time
function in my example. I don't know why, but if I add time
into tools list, it just won't work. However, if there's only calculate
function. It works again.
Okay, I found that it can correctly invoke tool function if there's any param in the function declaration like the code in below. But why is that?
def getTime(arg: str) -> str:
"""
Get the current time.
Args:
arg (str): random string
Returns:
str: The current time
"""
return '1970-01-01 00:00:00'
This was fixed by #406
Description of the bug:
My app ran well with function calling 12 days ago. However, when I tried to use this app today, Gemini API raised an InvalidArgument exception. And I managed to figure out it will only occurs when
tools
argument is not empty.Actual vs expected behavior:
It raises an InvalidArgument exception. The expected behaviour is that it should return a normal response like it used to.
Any other information you'd like to share?
Minimal reproducible example:
Log: