We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
AutomaticFunctionCallingResponder
1 parent 5a300c1 commit 58e6ac9Copy full SHA for 58e6ac9
vertexai/generative_models/_generative_models.py
@@ -2378,7 +2378,13 @@ def respond_to_model_response(
2378
)
2379
callable_function = None
2380
for tool in tools:
2381
- callable_function = tool._callable_functions.get(function_call.name)
+ new_callable_function = tool._callable_functions.get(function_call.name)
2382
+ if new_callable_function and callable_function:
2383
+ raise ValueError(
2384
+ "Multiple functions with the same name are not supported."
2385
+ f" Found {callable_function} and {new_callable_function}."
2386
+ )
2387
+ callable_function = new_callable_function
2388
if not callable_function:
2389
raise RuntimeError(
2390
f"""Model has asked to call function "{function_call.name}" which was not found."""
0 commit comments