Skip to content

Commit dfd678e

Browse files
authored
Improve flaky tool invocation integration test (#10187)
1 parent 152a16c commit dfd678e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/tools/test_component_tool.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ def test_component_tool_in_pipeline_openai_tools_strict(self):
543543
# Connect components
544544
pipeline.connect("llm.replies", "tool_invoker.messages")
545545

546-
message = ChatMessage.from_user(text="Vladimir")
546+
message = ChatMessage.from_user(text="Using tools, greet Vladimir")
547547

548548
# Run pipeline
549549
result = pipeline.run({"llm": {"messages": [message]}})
@@ -569,7 +569,7 @@ def test_user_greeter_in_pipeline(self):
569569
pipeline.add_component("tool_invoker", ToolInvoker(tools=[tool]))
570570
pipeline.connect("llm.replies", "tool_invoker.messages")
571571

572-
message = ChatMessage.from_user(text="I am Alice and I'm 30 years old")
572+
message = ChatMessage.from_user(text="Greet the user Alice who is 30 years old")
573573

574574
result = pipeline.run({"llm": {"messages": [message]}})
575575
tool_messages = result["tool_invoker"]["tool_messages"]
@@ -625,7 +625,9 @@ def test_person_processor_in_pipeline(self):
625625
pipeline.add_component("tool_invoker", ToolInvoker(tools=[tool]))
626626
pipeline.connect("llm.replies", "tool_invoker.messages")
627627

628-
message = ChatMessage.from_user(text="Diana lives at 123 Elm Street in Metropolis")
628+
message = ChatMessage.from_user(
629+
text="Process information about the person Diana who lives at 123 Elm Street in Metropolis"
630+
)
629631

630632
result = pipeline.run({"llm": {"messages": [message]}})
631633
tool_messages = result["tool_invoker"]["tool_messages"]

0 commit comments

Comments
 (0)