Skip to content

Commit f9b947c

Browse files
committed
No need to warm_up tools in Agent as they are warmed up by ToolInvoker
1 parent bda2195 commit f9b947c

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

haystack/components/agents/agent.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,7 @@
2525
from haystack.dataclasses import ChatMessage, ChatRole
2626
from haystack.dataclasses.breakpoints import AgentBreakpoint, AgentSnapshot, PipelineSnapshot, ToolBreakpoint
2727
from haystack.dataclasses.streaming_chunk import StreamingCallbackT, select_streaming_callback
28-
from haystack.tools import (
29-
Tool,
30-
Toolset,
31-
deserialize_tools_or_toolset_inplace,
32-
serialize_tools_or_toolset,
33-
warm_up_tools,
34-
)
28+
from haystack.tools import Tool, Toolset, deserialize_tools_or_toolset_inplace, serialize_tools_or_toolset
3529
from haystack.utils import _deserialize_value_with_schema
3630
from haystack.utils.callable_serialization import deserialize_callable, serialize_callable
3731
from haystack.utils.deserialization import deserialize_chatgenerator_inplace
@@ -202,10 +196,6 @@ def warm_up(self) -> None:
202196
if not self._is_warmed_up:
203197
if hasattr(self.chat_generator, "warm_up"):
204198
self.chat_generator.warm_up()
205-
206-
# Warm up tools
207-
warm_up_tools(self.tools)
208-
209199
self._is_warmed_up = True
210200

211201
def to_dict(self) -> dict[str, Any]:

0 commit comments

Comments
 (0)