agentx-dev 2.1__tar.gz → 2.3__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentx-dev
3
- Version: 2.1
3
+ Version: 2.3
4
4
  Summary: A lightweight LLM agent framework with standard and structured tool support use, prompt management, and support for OpenAI.
5
5
  Author-email: Bruce-Arhin Shadrach <brucearhin098@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/shadrach098/Bruce_framework
@@ -32,7 +32,7 @@ Requires-Dist: PyYAML>=5.3.1
32
32
  published to PyPI:
33
33
 
34
34
  ```sh
35
- pip install agentx-dev==2.1
35
+ pip install agentx-dev==2.3
36
36
  ```
37
37
 
38
38
  ## Example use
@@ -68,7 +68,7 @@ tools = [StructuredTool(name="MultiplyTool",
68
68
  agent = AgentRunner(model=chat_model,Agent=ReAct, tools=tools)
69
69
 
70
70
  # Initialize the agent with user input
71
- response = agent.Initialize("What is 5 times 8?")
71
+ response = agent.Initialize("What is 5 times 8?",ChatHistory=[{'role':"assistant",'content':'hello there how is it going'}])
72
72
 
73
73
  # Print the result
74
74
  print(response.content)
@@ -16,7 +16,7 @@
16
16
  published to PyPI:
17
17
 
18
18
  ```sh
19
- pip install agentx-dev==2.1
19
+ pip install agentx-dev==2.3
20
20
  ```
21
21
 
22
22
  ## Example use
@@ -52,7 +52,7 @@ tools = [StructuredTool(name="MultiplyTool",
52
52
  agent = AgentRunner(model=chat_model,Agent=ReAct, tools=tools)
53
53
 
54
54
  # Initialize the agent with user input
55
- response = agent.Initialize("What is 5 times 8?")
55
+ response = agent.Initialize("What is 5 times 8?",ChatHistory=[{'role':"assistant",'content':'hello there how is it going'}])
56
56
 
57
57
  # Print the result
58
58
  print(response.content)
@@ -197,7 +197,7 @@ class AgentRunner:
197
197
  logger.warning(f"Tool '{tool_name}' not found. Available tools: {list(self.func.keys()) + list(self.args.keys())}")
198
198
  return f"Error: Tool '{tool_name}' not found. Please double-check the tool name."
199
199
 
200
- def Initialize(self, user_input: str)-> AgentCompletion:
200
+ def Initialize(self, user_input: str,ChatHistory:Optional[List[Dict[str,str]]]=None)-> AgentCompletion:
201
201
 
202
202
 
203
203
  """
@@ -217,7 +217,13 @@ class AgentRunner:
217
217
 
218
218
  if not any(entry["role"] == "system" for entry in self.history):
219
219
  self.history.append({"role": "system", "content": self.format_prompt})
220
-
220
+ if ChatHistory and isinstance(ChatHistory,List[Dict[str,str]]):
221
+ for r in ChatHistory:
222
+ if r.role and r.content:
223
+ self.history.append({'role':r.role,'content':r.content + r.timestamp if r.get('timestamp') else r.content})
224
+
225
+
226
+
221
227
  self.history.append({"role":"user","content":self.Query})
222
228
 
223
229
  # logger.info to announce the start of the process.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentx-dev
3
- Version: 2.1
3
+ Version: 2.3
4
4
  Summary: A lightweight LLM agent framework with standard and structured tool support use, prompt management, and support for OpenAI.
5
5
  Author-email: Bruce-Arhin Shadrach <brucearhin098@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/shadrach098/Bruce_framework
@@ -32,7 +32,7 @@ Requires-Dist: PyYAML>=5.3.1
32
32
  published to PyPI:
33
33
 
34
34
  ```sh
35
- pip install agentx-dev==2.1
35
+ pip install agentx-dev==2.3
36
36
  ```
37
37
 
38
38
  ## Example use
@@ -68,7 +68,7 @@ tools = [StructuredTool(name="MultiplyTool",
68
68
  agent = AgentRunner(model=chat_model,Agent=ReAct, tools=tools)
69
69
 
70
70
  # Initialize the agent with user input
71
- response = agent.Initialize("What is 5 times 8?")
71
+ response = agent.Initialize("What is 5 times 8?",ChatHistory=[{'role':"assistant",'content':'hello there how is it going'}])
72
72
 
73
73
  # Print the result
74
74
  print(response.content)
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
 
3
3
  name = "agentx-dev"
4
- version = "2.1"
4
+ version = "2.3"
5
5
  description = "A lightweight LLM agent framework with standard and structured tool support use, prompt management, and support for OpenAI."
6
6
  authors = [{ name = "Bruce-Arhin Shadrach", email = "brucearhin098@gmail.com" }]
7
7
  # Best practice: link to the license file
File without changes
File without changes
File without changes