diff --git a/01_ai_agents_first/15_advanced_tools/tools_masterclass/part4.py b/01_ai_agents_first/15_advanced_tools/tools_masterclass/part4.py index 6e24b2db..45a10292 100644 --- a/01_ai_agents_first/15_advanced_tools/tools_masterclass/part4.py +++ b/01_ai_agents_first/15_advanced_tools/tools_masterclass/part4.py @@ -23,7 +23,7 @@ openai_client=external_client ) -@function_tool(description_override="", failure_error_function=) +@function_tool(description_override="", failure_error_function=None) def get_weather(city: str) -> str: try: # If Call Fails Call another service i.e get_weather_alternative @@ -35,7 +35,7 @@ def get_weather(city: str) -> str: except Exception as e: raise Exception(f"An unexpected error occurred: {str(e)}") -base_agent: Agent = Agent(name="WeatherAgent", instructions="" model=llm_model, tools=[get_weather]) +base_agent: Agent = Agent(name="WeatherAgent", instructions="", model=llm_model, tools=[get_weather]) async def main(): res = await Runner.run(base_agent, "What is weather in Lahore")