fix(vertex_ai.py): fix faulty async completion function call tool check

This commit is contained in:
Krrish Dholakia 2024-04-17 16:30:28 -07:00
parent 32d94feddd
commit c47b39c032

View file

@ -876,8 +876,8 @@ async def async_completion(
tools=tools, tools=tools,
) )
if tools is not None and hasattr( if tools is not None and bool(
response.candidates[0].content.parts[0], "function_call" getattr(response.candidates[0].content.parts[0], "function_call", None)
): ):
function_call = response.candidates[0].content.parts[0].function_call function_call = response.candidates[0].content.parts[0].function_call
args_dict = {} args_dict = {}