quantalogic 0.2.25__py3-none-any.whl → 0.2.26__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.
quantalogic/.DS_Store ADDED
Binary file
quantalogic/agent.py CHANGED
@@ -164,7 +164,11 @@ class Agent(BaseModel):
164
164
  self.task_to_solve_summary = self._generate_task_summary(task)
165
165
 
166
166
  # Add system prompt to memory
167
- self.memory.add(Message(role="system", content=self.config.system_prompt))
167
+ # Check if system prompt is already in memory
168
+ # if not add it
169
+ # The system message is always the first message in memory
170
+ if not self.memory.memory or self.memory.memory[0].role != "system":
171
+ self.memory.add(Message(role="system", content=self.config.system_prompt))
168
172
 
169
173
  self._emit_event(
170
174
  "session_start",
@@ -122,7 +122,6 @@ class LLMTool(Tool):
122
122
  # Prepare the messages history
123
123
  messages_history = [
124
124
  Message(role="system", content=used_system_prompt),
125
- Message(role="user", content=prompt),
126
125
  ]
127
126
 
128
127
  is_streaming = self.on_token is not None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: quantalogic
3
- Version: 0.2.25
3
+ Version: 0.2.26
4
4
  Summary: QuantaLogic ReAct Agents
5
5
  Author: Raphaël MANSUY
6
6
  Author-email: raphael.mansuy@gmail.com
@@ -1,5 +1,6 @@
1
+ quantalogic/.DS_Store,sha256=eca-id755LHcqhOPlLg84Op_uvWhoJGFTR_i_r8G2K8,6148
1
2
  quantalogic/__init__.py,sha256=kX0c_xmD9OslWnAE92YHMGuD7xZcTo8ZOF_5R64HKps,784
2
- quantalogic/agent.py,sha256=JJQkUcUtwkXHMk2Fk3_PG-R1ZI_axz0v6L0FcEztDJM,31615
3
+ quantalogic/agent.py,sha256=r6MbnVaBv9tYNk8WR7YJAjXlEGgko8GSYitWzr7uNMY,31841
3
4
  quantalogic/agent_config.py,sha256=9sjDnCPlAqVM45oguB_D509WSCaXZmuaVUtLcOvDlPg,7572
4
5
  quantalogic/agent_factory.py,sha256=ODVGuGtugSzmSdP6jiWlT8WyC5onANc6BIs83FC90Bg,3782
5
6
  quantalogic/coding_agent.py,sha256=UJ0fdKKA8XSB2py0NW4-e-orozo78ZAprXWuortYBiA,4935
@@ -47,7 +48,7 @@ quantalogic/tools/language_handlers/rust_handler.py,sha256=t_AqKVa3KVk6SVkq_UjUU
47
48
  quantalogic/tools/language_handlers/scala_handler.py,sha256=wr-cWOIFOc0UYwODmEtT6rV63Qf1NyNB_BLo23GLrvk,1281
48
49
  quantalogic/tools/language_handlers/typescript_handler.py,sha256=L4vuJMYxKO3_83dQhdwZ9fogauIV7rwoicRT0xLGfkQ,1738
49
50
  quantalogic/tools/list_directory_tool.py,sha256=8Hy38DelSh-mRqS_uDLpeBYoHLtEy5ji77xI-TJu3Ms,4176
50
- quantalogic/tools/llm_tool.py,sha256=6OSfEyV-VDlJjoQrRusXgeM-CPbTLZv1Yr1aRaXndVI,7064
51
+ quantalogic/tools/llm_tool.py,sha256=CFTvr-RTFiuGWlOLtvw4zv93s_CLUHuHfNmvK6QpQiQ,7014
51
52
  quantalogic/tools/llm_vision_tool.py,sha256=eVDIrANxxZCHxYp9xaAN8hLdFhlYm7bUu2tX9-1xUbI,5496
52
53
  quantalogic/tools/markitdown_tool.py,sha256=lpbJBLx43_x2DjiZAV1HSidkHeqkkV0KvgeLG2fphK4,4339
53
54
  quantalogic/tools/nodejs_tool.py,sha256=zdnE0VFj_5786uR2L0o-SKR0Gk8L-U7rdj7xGHJYIq0,19905
@@ -79,8 +80,8 @@ quantalogic/version_check.py,sha256=cttR1lR3OienGLl7NrK1Te1fhDkqSjCci7HC1vFUTSY,
79
80
  quantalogic/welcome_message.py,sha256=IXMhem8h7srzNUwvw8G_lmEkHU8PFfote021E_BXmVk,3039
80
81
  quantalogic/xml_parser.py,sha256=uMLQNHTRCg116FwcjRoquZmSwVtE4LEH-6V2E3RD-dA,11466
81
82
  quantalogic/xml_tool_parser.py,sha256=Vz4LEgDbelJynD1siLOVkJ3gLlfHsUk65_gCwbYJyGc,3784
82
- quantalogic-0.2.25.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
83
- quantalogic-0.2.25.dist-info/METADATA,sha256=MwnMh_F2PiVY2lYXAStsCFpf0Slcs67RAFtbu1jbFwk,20216
84
- quantalogic-0.2.25.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
85
- quantalogic-0.2.25.dist-info/entry_points.txt,sha256=h74O_Q3qBRCrDR99qvwB4BpBGzASPUIjCfxHq6Qnups,183
86
- quantalogic-0.2.25.dist-info/RECORD,,
83
+ quantalogic-0.2.26.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
84
+ quantalogic-0.2.26.dist-info/METADATA,sha256=jb0PIHKkAGlfW5x3GPQvcbzJNbG-79nxJm-t8zCN7hA,20216
85
+ quantalogic-0.2.26.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
86
+ quantalogic-0.2.26.dist-info/entry_points.txt,sha256=h74O_Q3qBRCrDR99qvwB4BpBGzASPUIjCfxHq6Qnups,183
87
+ quantalogic-0.2.26.dist-info/RECORD,,