Skip to content

Commit 1d64754

Browse files
authored
Merge pull request #90 from olivier-lacroix/fix/tools
Fix merge issue and exclude private methods
2 parents 1a3b37b + 26edee5 commit 1d64754

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

pipelines/google/google_gemini.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
author_url: https://github.com/owndev/
55
project_url: https://github.com/owndev/Open-WebUI-Functions
66
funding_url: https://github.com/sponsors/owndev
7-
version: 1.6.7
7+
version: 1.6.8
88
required_open_webui_version: 0.6.26
99
license: Apache License 2.0
1010
description: Highly optimized Google Gemini pipeline with advanced image generation capabilities, intelligent compression, and streamlined processing workflows.
@@ -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)