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.
- {dm_aioaiagent-0.5.2 → dm_aioaiagent-0.5.3}/PKG-INFO +1 -1
- {dm_aioaiagent-0.5.2 → dm_aioaiagent-0.5.3}/dm_aioaiagent/ai_agent.py +3 -3
- {dm_aioaiagent-0.5.2 → dm_aioaiagent-0.5.3}/dm_aioaiagent/async_ai_agent.py +3 -3
- {dm_aioaiagent-0.5.2 → dm_aioaiagent-0.5.3}/dm_aioaiagent.egg-info/PKG-INFO +1 -1
- {dm_aioaiagent-0.5.2 → dm_aioaiagent-0.5.3}/setup.py +1 -1
- {dm_aioaiagent-0.5.2 → dm_aioaiagent-0.5.3}/README.md +0 -0
- {dm_aioaiagent-0.5.2 → dm_aioaiagent-0.5.3}/dm_aioaiagent/__init__.py +0 -0
- {dm_aioaiagent-0.5.2 → dm_aioaiagent-0.5.3}/dm_aioaiagent/openai_image_message_content.py +0 -0
- {dm_aioaiagent-0.5.2 → dm_aioaiagent-0.5.3}/dm_aioaiagent/types.py +0 -0
- {dm_aioaiagent-0.5.2 → dm_aioaiagent-0.5.3}/dm_aioaiagent.egg-info/SOURCES.txt +0 -0
- {dm_aioaiagent-0.5.2 → dm_aioaiagent-0.5.3}/dm_aioaiagent.egg-info/dependency_links.txt +0 -0
- {dm_aioaiagent-0.5.2 → dm_aioaiagent-0.5.3}/dm_aioaiagent.egg-info/requires.txt +0 -0
- {dm_aioaiagent-0.5.2 → dm_aioaiagent-0.5.3}/dm_aioaiagent.egg-info/top_level.txt +0 -0
- {dm_aioaiagent-0.5.2 → dm_aioaiagent-0.5.3}/setup.cfg +0 -0
|
@@ -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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|