dm-aioaiagent 0.5.2__tar.gz → 0.5.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: dm-aioaiagent
3
- Version: 0.5.2
3
+ Version: 0.5.3
4
4
  Summary: This is my custom aioaiagent client
5
5
  Home-page: https://pypi.org/project/dm-aioaiagent
6
6
  Author: dimka4621
@@ -179,20 +179,20 @@ class DMAIAgent:
179
179
  if self._before_tool_call_callback:
180
180
  self._before_tool_call_callback(tool_name, tool_args)
181
181
  except Exception as e:
182
- self._logger.error(str(e), callback_type="before_tool_call")
182
+ self._logger.error(e, callback_type="before_tool_call")
183
183
 
184
184
  try:
185
185
  self._logger.debug("Invoke tool", tool_id=tool_id, tool_name=tool_name, tool_args=tool_args)
186
186
  tool_response = self._tool_map[tool_name].run(tool_args)
187
187
  except Exception as e:
188
- self._logger.error(str(e), tool_id=tool_id)
188
+ self._logger.error(e, tool_id=tool_id)
189
189
  tool_response = "Tool executed with an error!"
190
190
 
191
191
  try:
192
192
  if self._after_tool_call_callback:
193
193
  self._after_tool_call_callback(tool_name, tool_args, tool_response)
194
194
  except Exception as e:
195
- self._logger.error(str(e), callback_type="after_tool_call")
195
+ self._logger.error(e, callback_type="after_tool_call")
196
196
  else:
197
197
  tool_response = f"Tool not found!"
198
198
  self._logger.debug(f"Tool response:\n{tool_response}", tool_id=tool_id)
@@ -95,20 +95,20 @@ class DMAioAIAgent(DMAIAgent):
95
95
  if self._before_tool_call_callback:
96
96
  await self._before_tool_call_callback(tool_name, tool_args)
97
97
  except Exception as e:
98
- self._logger.error(str(e), callback_type="before_tool_call")
98
+ self._logger.error(e, callback_type="before_tool_call")
99
99
 
100
100
  try:
101
101
  self._logger.debug("Invoke tool", tool_id=tool_id, tool_name=tool_name, tool_args=tool_args)
102
102
  tool_response = await self._tool_map[tool_name].arun(tool_args)
103
103
  except Exception as e:
104
- self._logger.error(str(e), tool_id=tool_id)
104
+ self._logger.error(e, tool_id=tool_id)
105
105
  tool_response = "Tool executed with an error!"
106
106
 
107
107
  try:
108
108
  if self._after_tool_call_callback:
109
109
  await self._after_tool_call_callback(tool_name, tool_args, tool_response)
110
110
  except Exception as e:
111
- self._logger.error(str(e), callback_type="after_tool_call")
111
+ self._logger.error(e, callback_type="after_tool_call")
112
112
  else:
113
113
  tool_response = f"Tool '{tool_name}' not found!"
114
114
  self._logger.debug(f"Tool response:\n{tool_response}", tool_id=tool_id)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dm-aioaiagent
3
- Version: 0.5.2
3
+ Version: 0.5.3
4
4
  Summary: This is my custom aioaiagent client
5
5
  Home-page: https://pypi.org/project/dm-aioaiagent
6
6
  Author: dimka4621
@@ -8,7 +8,7 @@ def readme():
8
8
 
9
9
  setup(
10
10
  name='dm-aioaiagent',
11
- version='v0.5.2',
11
+ version='v0.5.3',
12
12
  author='dimka4621',
13
13
  author_email='mismartconfig@gmail.com',
14
14
  description='This is my custom aioaiagent client',
File without changes
File without changes