@@ -339,17 +339,17 @@ def test_serde_in_pipeline(self, monkeypatch):
339339 # add outputs_to_string, inputs_from_state and outputs_to_state tool parameters for compatibility with
340340 # haystack-ai>=2.12.0
341341 if hasattr (tool , "outputs_to_string" ):
342- expected_dict ["components" ]["generator" ]["init_parameters" ]["tools" ][0 ]["data" ][
343- " outputs_to_string"
344- ] = tool . outputs_to_string
342+ expected_dict ["components" ]["generator" ]["init_parameters" ]["tools" ][0 ]["data" ]["outputs_to_string" ] = (
343+ tool . outputs_to_string
344+ )
345345 if hasattr (tool , "inputs_from_state" ):
346- expected_dict ["components" ]["generator" ]["init_parameters" ]["tools" ][0 ]["data" ][
347- " inputs_from_state"
348- ] = tool . inputs_from_state
346+ expected_dict ["components" ]["generator" ]["init_parameters" ]["tools" ][0 ]["data" ]["inputs_from_state" ] = (
347+ tool . inputs_from_state
348+ )
349349 if hasattr (tool , "outputs_to_state" ):
350- expected_dict ["components" ]["generator" ]["init_parameters" ]["tools" ][0 ]["data" ][
351- " outputs_to_state"
352- ] = tool . outputs_to_state
350+ expected_dict ["components" ]["generator" ]["init_parameters" ]["tools" ][0 ]["data" ]["outputs_to_state" ] = (
351+ tool . outputs_to_state
352+ )
353353
354354 assert pipeline_dict == expected_dict
355355
@@ -415,7 +415,6 @@ async def test_run_async(self):
415415 @pytest .mark .integration
416416 @pytest .mark .skipif (not os .environ .get ("GOOGLE_API_KEY" , None ), reason = "GOOGLE_API_KEY env var not set" )
417417 def test_run_with_tools (self , tools ):
418-
419418 gemini_chat = GoogleAIGeminiChatGenerator (model = "gemini-2.0-flash-exp" , tools = tools )
420419 user_message = [ChatMessage .from_user ("What is the temperature in celsius in Berlin?" )]
421420 response = gemini_chat .run (messages = user_message )
@@ -452,7 +451,6 @@ def test_run_with_tools(self, tools):
452451 @pytest .mark .integration
453452 @pytest .mark .skipif (not os .environ .get ("GOOGLE_API_KEY" , None ), reason = "GOOGLE_API_KEY env var not set" )
454453 async def test_run_with_tools_async (self , tools ):
455-
456454 gemini_chat = GoogleAIGeminiChatGenerator (model = "gemini-2.0-flash-exp" , tools = tools )
457455 user_message = [ChatMessage .from_user ("What is the temperature in celsius in Berlin?" )]
458456 response = await gemini_chat .run_async (messages = user_message )
@@ -488,7 +486,6 @@ async def test_run_with_tools_async(self, tools):
488486 @pytest .mark .integration
489487 @pytest .mark .skipif (not os .environ .get ("GOOGLE_API_KEY" , None ), reason = "GOOGLE_API_KEY env var not set" )
490488 def test_run_with_tools_and_tool_config (self , tools ):
491-
492489 def get_population (city : Annotated [str , "the city for which to get the population, e.g. 'Munich'" ] = "Munich" ):
493490 """A simple function to get the population for a location."""
494491 return f"Population of { city } : 1,000,000"
@@ -524,7 +521,6 @@ def get_population(city: Annotated[str, "the city for which to get the populatio
524521 @pytest .mark .integration
525522 @pytest .mark .skipif (not os .environ .get ("GOOGLE_API_KEY" , None ), reason = "GOOGLE_API_KEY env var not set" )
526523 async def test_run_with_tools_and_tool_config_async (self , tools ):
527-
528524 def get_population (city : Annotated [str , "the city for which to get the population, e.g. 'Munich'" ] = "Munich" ):
529525 """A simple function to get the population for a location."""
530526 return f"Population of { city } : 1,000,000"
0 commit comments