Skip to content

Commit 1a3b37b

Browse files
authored
Merge pull request #89 from olivier-lacroix/fix/native-detection
Fix native mode detection
2 parents ee847c6 + 5db7eb4 commit 1a3b37b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pipelines/google/google_gemini.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1413,8 +1413,10 @@ def _configure_generation(
14131413
types.Tool(google_search=types.GoogleSearch())
14141414
)
14151415

1416-
if __tools__ is not None and __metadata__.get("function_calling") == "native":
1417-
for name, tool in __tools__.items():
1416+
params = __metadata__.get("params", {})
1417+
if __tools__ is not None and params.get("function_calling") == "native":
1418+
for name, tool_def in __tools__.items():
1419+
tool = self._create_tool(tool_def)
14181420
self.log.debug(
14191421
f"Adding tool '{name}' with signature {tool.__signature__}"
14201422
)

0 commit comments

Comments
 (0)