Skip to content

Commit

Permalink
fix standard_tests (#541)
Browse files Browse the repository at this point in the history
  • Loading branch information
lkuligin authored Oct 5, 2024
1 parent 0c58407 commit 679630e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libs/genai/langchain_google_genai/_function_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,9 @@ def _format_to_gapic_function_declaration(
function = cast(dict, tool)
function["parameters"] = {}
else:
if "parameters" in tool and tool["parameters"].get("properties"): # type: ignore[index]
if (
"parameters" in tool and tool["parameters"].get("properties") # type: ignore[index]
) or "properties" in tool:
function = convert_to_openai_tool(cast(dict, tool))["function"]
else:
function = cast(dict, tool)
Expand Down

0 comments on commit 679630e

Please sign in to comment.