1 parent c7c5be5 commit 3e81c75Copy full SHA for 3e81c75
1 file changed
swarms/structs/conversation.py
@@ -163,8 +163,14 @@ def setup_file_path(self):
163
extension = (
164
".json" if self.export_method == "json" else ".yaml"
165
)
166
- self.save_filepath = (
167
- f"conversation_{self.name}{extension}"
+ # Under conversations_dir, not the process's working directory:
+ # a bare relative name dropped conversation_<name>.json wherever
168
+ # the program happened to run from, and two conversations sharing
169
+ # a name in different directories silently loaded each other's
170
+ # history.
171
+ self.save_filepath = os.path.join(
172
+ self.conversations_dir or get_conversation_dir(),
173
+ f"conversation_{self.name}{extension}",
174
175
logger.debug(
176
f"Setting default save filepath to: {self.save_filepath}"
0 commit comments