Skip to content

Commit 1d5d769

Browse files
author
Shreyas-Microsoft
committed
use shallow copy
1 parent 5855a63 commit 1d5d769

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/backend/sql_agents/helpers/comms_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ async def async_invoke(self) -> AsyncIterable[ChatMessageContent]:
166166
while attempt < self.max_retries:
167167
try:
168168
# Grab a snapshot of the history of the group chat
169-
# Using copy to avoid getting a reference to the original list
170-
history_snap = copy.deepcopy(self.group_chat.history)
169+
# Using "SHALLOW" copy to avoid getting a reference to the original list
170+
history_snap = copy.copy(self.group_chat.history)
171171

172172
self.logger.debug(
173173
"History before invoke: %s",

0 commit comments

Comments
 (0)