Skip to content

Commit 2805844

Browse files
Fix merge issue and exclude private methods
1 parent 1a3b37b commit 2805844

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pipelines/google/google_gemini.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1416,12 +1416,12 @@ def _configure_generation(
14161416
params = __metadata__.get("params", {})
14171417
if __tools__ is not None and params.get("function_calling") == "native":
14181418
for name, tool_def in __tools__.items():
1419-
tool = self._create_tool(tool_def)
1420-
self.log.debug(
1421-
f"Adding tool '{name}' with signature {tool.__signature__}"
1422-
)
1423-
1424-
gen_config_params.setdefault("tools", []).append(tool)
1419+
if not name.startswith("_"):
1420+
tool = tool_def["callable"]
1421+
self.log.debug(
1422+
f"Adding tool '{name}' with signature {tool.__signature__}"
1423+
)
1424+
gen_config_params.setdefault("tools", []).append(tool)
14251425

14261426
# Filter out None values for generation config
14271427
filtered_params = {k: v for k, v in gen_config_params.items() if v is not None}

0 commit comments

Comments
 (0)