Skip to content

Commit

Permalink
Merge pull request #726 from MusaKhan16/fix-gemini-filesystemtoolkit
Browse files Browse the repository at this point in the history
Fix `GeminiTool` and `FileSystemToolkit`
  • Loading branch information
willbakst authored Dec 3, 2024
2 parents 68be19f + 4511f0d commit 705208d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mirascope/core/gemini/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ def format_book(title: str, author: str) -> str:
"""
model_schema = cls.model_json_schema()
fn: dict[str, Any] = {"name": cls._name(), "description": cls._description()}

if model_schema["properties"]:
fn["parameters"] = model_schema
if model_schema["required"]:
fn["parameters"]["required"] = model_schema["required"]

if "parameters" in fn:
if "$defs" in fn["parameters"]:
raise ValueError(
Expand Down

0 comments on commit 705208d

Please sign in to comment.