Skip to content

Commit

Permalink
deepcopy to copy
Browse files Browse the repository at this point in the history
  • Loading branch information
yiranwu0 committed Nov 11, 2023
1 parent f086f1d commit 37a923d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autogen/agentchat/contrib/compressible_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def _set_compress_config(self, compress_config: Optional[Dict] = False):
if compress_config.get("mode", "TERMINATE") not in allowed_modes:
raise ValueError(f"Invalid compression mode. Allowed values are: {', '.join(allowed_modes)}")

self.compress_config = copy.deepcopy(self.DEFAULT_COMPRESS_CONFIG)
self.compress_config = self.DEFAULT_COMPRESS_CONFIG.copy()
self.compress_config.update(compress_config)

if not isinstance(self.compress_config["leave_last_n"], int) or self.compress_config["leave_last_n"] < 0:
Expand Down

0 comments on commit 37a923d

Please sign in to comment.