Skip to content

Commit d0d2e3d

Browse files
oskarhanestellasia
authored andcommitted
Fix broken example file
1 parent 7b29fc9 commit d0d2e3d

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

examples/retrieve/tools/tools_retriever_example.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,8 @@ def __init__(self) -> None:
105105
"2025-04-16": [],
106106
}
107107

108-
# Define a wrapper function that handles the query parameter correctly
109-
def execute_func(query: str, **kwargs: Any) -> str:
110-
# Ignore the query parameter and call our execute method
108+
# Define a wrapper function that handles parameters correctly
109+
def execute_func(**kwargs: Any) -> str:
111110
return self.execute_calendar(**kwargs)
112111

113112
super().__init__(
@@ -166,9 +165,7 @@ def __init__(self) -> None:
166165
execute_func=self.execute_weather_retrieval,
167166
)
168167

169-
def execute_weather_retrieval(
170-
self, query: Optional[str] = None, **kwargs: Any
171-
) -> str:
168+
def execute_weather_retrieval(self, **kwargs: Any) -> str:
172169
"""Fetch historical weather data for a given date in Malmö, Sweden."""
173170
date_str = kwargs.get("date")
174171
if not date_str:
@@ -227,10 +224,6 @@ def execute_weather_retrieval(
227224
) as e:
228225
return f"Error parsing weather data for Malmö on {date_str}: {e}"
229226

230-
return (
231-
f"Sorry, I couldn't fetch the weather for Malmö on {date_str} at this time."
232-
)
233-
234227

235228
def main() -> None:
236229
"""Run the example."""

0 commit comments

Comments
 (0)