Skip to content

Commit bda2195

Browse files
committed
Further improve pydocs for warm_up
1 parent 5bc77fe commit bda2195

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

haystack/tools/tool.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ def warm_up(self) -> None:
103103
Prepare the Tool for use.
104104
105105
Override this method to establish connections to remote services, load models,
106-
or perform other resource-intensive initialization.
106+
or perform other resource-intensive initialization. This method should be idempotent,
107+
as it may be called multiple times.
107108
"""
108109
pass
109110

haystack/tools/toolset.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ def warm_up(self) -> None:
190190
Prepare the Toolset for use.
191191
192192
Override this method to set up shared resources like database connections or HTTP sessions.
193+
This method should be idempotent, as it may be called multiple times.
193194
"""
194195
pass
195196

0 commit comments

Comments
 (0)