beswarm 0.2.64__py3-none-any.whl → 0.2.65__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
beswarm/agents/planact.py CHANGED
@@ -90,8 +90,16 @@ class InstructionAgent(BaseAgent):
90
90
  self.goal_diff = '\n'.join(changed_lines).strip()
91
91
 
92
92
  def get_conversation_history(self, raw_conversation_history: List[Dict]):
93
- conversation_history = copy.deepcopy(raw_conversation_history)
94
93
 
94
+ for index, message in enumerate(raw_conversation_history):
95
+ if message.get("content") and isinstance(message["content"], str):
96
+ if "<knowledge_graph_tree>" in message["content"] and self.graph_tree:
97
+ message["content"] = replace_xml_content(message["content"], "knowledge_graph_tree", self.graph_tree)
98
+ raw_conversation_history[index] = message
99
+ if "\n\nYour message **must** end with [done] to signify the end of your output." in message["content"]:
100
+ message["content"] = message["content"].replace("\n\nYour message **must** end with [done] to signify the end of your output.", "")
101
+
102
+ conversation_history = copy.deepcopy(raw_conversation_history)
95
103
  self.cache_file.write_text(json.dumps(conversation_history, ensure_ascii=False, indent=4), encoding="utf-8")
96
104
 
97
105
  work_agent_system_prompt = conversation_history.pop(0)
@@ -113,13 +121,6 @@ class InstructionAgent(BaseAgent):
113
121
  if "<knowledge_graph_tree>" in message["content"] and self.graph_tree:
114
122
  message["content"] = replace_xml_content(message["content"], "knowledge_graph_tree", self.graph_tree)
115
123
 
116
- for index, message in enumerate(raw_conversation_history):
117
- if message.get("content") and isinstance(message["content"], str):
118
- if "<knowledge_graph_tree>" in message["content"] and self.graph_tree:
119
- message["content"] = replace_xml_content(message["content"], "knowledge_graph_tree", self.graph_tree)
120
- raw_conversation_history[index] = message
121
- if "\n\nYour message **must** end with [done] to signify the end of your output." in message["content"]:
122
- message["content"] = message["content"].replace("\n\nYour message **must** end with [done] to signify the end of your output.", "")
123
124
 
124
125
  return conversation_history
125
126
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: beswarm
3
- Version: 0.2.64
3
+ Version: 0.2.65
4
4
  Summary: MAS
5
5
  Requires-Python: >=3.11
6
6
  Description-Content-Type: text/markdown
@@ -6,7 +6,7 @@ beswarm/prompt.py,sha256=qlH-yYCGv9j9-5grnMXl0B53CDZgfTpe4ncwBwgWg7o,32816
6
6
  beswarm/taskmanager.py,sha256=vMmcoZ4FlNvjEliRkv3AniPji50NcY4Q1_2HETzR0DU,12226
7
7
  beswarm/utils.py,sha256=0J-b38P5QGT-A_38co7FjzaUNJykaskI7mbbcQ4w_68,8215
8
8
  beswarm/agents/chatgroup.py,sha256=PzrmRcDKAbB7cxL16nMod_CzPosDV6bfTmXxQVuv-AQ,12012
9
- beswarm/agents/planact.py,sha256=z-RDEgDilrT6hNIN4G_3m04iJ698qyovZ5WG6QdywdA,20265
9
+ beswarm/agents/planact.py,sha256=7w9MuVhPk9WlMnGy_LlX8uCVM3pZs2IHf9dSIrHKOjo,20266
10
10
  beswarm/aient/aient/__init__.py,sha256=SRfF7oDVlOOAi6nGKiJIUK6B_arqYLO9iSMp-2IZZps,21
11
11
  beswarm/aient/aient/core/__init__.py,sha256=NxjebTlku35S4Dzr16rdSqSTWUvvwEeACe8KvHJnjPg,34
12
12
  beswarm/aient/aient/core/log_config.py,sha256=kz2_yJv1p-o3lUQOwA3qh-LSc3wMHv13iCQclw44W9c,274
@@ -116,7 +116,7 @@ beswarm/tools/search_web.py,sha256=NYrb5KL_WUGPm-fOKT8Cyjon04lxBU-gaLdrVjeYgGo,1
116
116
  beswarm/tools/subtasks.py,sha256=mIjA2QrRy9Fos4rYm8fCfu2QrsE_MGnQI9IR8dOxsGs,9885
117
117
  beswarm/tools/worker.py,sha256=_cSkRUKRJMAiZiTfnBze_e9Kc7k7KvbB5hdxdvp4FW4,2009
118
118
  beswarm/tools/write_csv.py,sha256=u0Hq18Ksfheb52MVtyLNCnSDHibITpsYBPs2ub7USYA,1466
119
- beswarm-0.2.64.dist-info/METADATA,sha256=r20jVhGZeCVTqP61MuBhdDnJi1Fn5QCuF1PZCibzgww,3878
120
- beswarm-0.2.64.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
121
- beswarm-0.2.64.dist-info/top_level.txt,sha256=pJw4O87wvt5882smuSO6DfByJz7FJ8SxxT8h9fHCmpo,8
122
- beswarm-0.2.64.dist-info/RECORD,,
119
+ beswarm-0.2.65.dist-info/METADATA,sha256=N6OxxpRDR-33aH_G1t2cPk7tsLm__CHfuU9gWwz9fns,3878
120
+ beswarm-0.2.65.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
121
+ beswarm-0.2.65.dist-info/top_level.txt,sha256=pJw4O87wvt5882smuSO6DfByJz7FJ8SxxT8h9fHCmpo,8
122
+ beswarm-0.2.65.dist-info/RECORD,,