dm-aioaiagent 0.5.5__tar.gz → 0.5.7__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.5 → dm_aioaiagent-0.5.7}/PKG-INFO +3 -3
- {dm_aioaiagent-0.5.5 → dm_aioaiagent-0.5.7}/dm_aioaiagent/ai_agent.py +6 -2
- {dm_aioaiagent-0.5.5 → dm_aioaiagent-0.5.7}/dm_aioaiagent/async_ai_agent.py +4 -2
- {dm_aioaiagent-0.5.5 → dm_aioaiagent-0.5.7}/dm_aioaiagent.egg-info/PKG-INFO +3 -3
- {dm_aioaiagent-0.5.5 → dm_aioaiagent-0.5.7}/dm_aioaiagent.egg-info/requires.txt +1 -1
- {dm_aioaiagent-0.5.5 → dm_aioaiagent-0.5.7}/setup.py +3 -3
- {dm_aioaiagent-0.5.5 → dm_aioaiagent-0.5.7}/README.md +0 -0
- {dm_aioaiagent-0.5.5 → dm_aioaiagent-0.5.7}/dm_aioaiagent/__init__.py +0 -0
- {dm_aioaiagent-0.5.5 → dm_aioaiagent-0.5.7}/dm_aioaiagent/openai_image_message_content.py +0 -0
- {dm_aioaiagent-0.5.5 → dm_aioaiagent-0.5.7}/dm_aioaiagent/types.py +0 -0
- {dm_aioaiagent-0.5.5 → dm_aioaiagent-0.5.7}/dm_aioaiagent.egg-info/SOURCES.txt +0 -0
- {dm_aioaiagent-0.5.5 → dm_aioaiagent-0.5.7}/dm_aioaiagent.egg-info/dependency_links.txt +0 -0
- {dm_aioaiagent-0.5.5 → dm_aioaiagent-0.5.7}/dm_aioaiagent.egg-info/top_level.txt +0 -0
- {dm_aioaiagent-0.5.5 → dm_aioaiagent-0.5.7}/setup.cfg +0 -0
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dm-aioaiagent
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.7
|
|
4
4
|
Summary: This is my custom aioaiagent client
|
|
5
5
|
Home-page: https://pypi.org/project/dm-aioaiagent
|
|
6
6
|
Author: dimka4621
|
|
7
7
|
Author-email: mismartconfig@gmail.com
|
|
8
8
|
Project-URL: GitHub, https://github.com/MykhLibs/dm-aioaiagent
|
|
9
9
|
Keywords: dm aioaiagent
|
|
10
|
-
Classifier: Programming Language :: Python :: 3.
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
11
11
|
Classifier: License :: OSI Approved :: MIT License
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
13
|
Requires-Python: >=3.9
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
15
15
|
Requires-Dist: dm-logger<0.7.0,>=0.6.6
|
|
16
|
-
Requires-Dist: python-dotenv
|
|
16
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
17
17
|
Requires-Dist: pydantic<3.0.0,>=2.9.2
|
|
18
18
|
Requires-Dist: langchain<0.4.0,>=0.3.0
|
|
19
19
|
Requires-Dist: langchain-core<0.4.0,>=0.3.5
|
|
@@ -36,6 +36,7 @@ class DMAIAgent:
|
|
|
36
36
|
max_memory_messages: int = MAX_MEMORY_MESSAGES,
|
|
37
37
|
# other
|
|
38
38
|
input_output_logging: bool = True,
|
|
39
|
+
node_execution_logging: bool = True,
|
|
39
40
|
response_if_request_fail: str = "I can't provide a response right now. Please try again later.",
|
|
40
41
|
response_if_invalid_image: str = "The image is unavailable or the link is incorrect.",
|
|
41
42
|
# llm provider
|
|
@@ -66,6 +67,7 @@ class DMAIAgent:
|
|
|
66
67
|
self._max_memory_messages = self._validate_max_memory_messages(max_memory_messages)
|
|
67
68
|
# other
|
|
68
69
|
self._input_output_logging = bool(input_output_logging)
|
|
70
|
+
self._node_execution_logging = bool(node_execution_logging)
|
|
69
71
|
self._response_if_request_fail = str(response_if_request_fail)
|
|
70
72
|
self._response_if_invalid_image = str(response_if_invalid_image)
|
|
71
73
|
# llm provider
|
|
@@ -142,7 +144,8 @@ class DMAIAgent:
|
|
|
142
144
|
return state
|
|
143
145
|
|
|
144
146
|
def _invoke_llm_node(self, state: State, second_attempt: bool = False) -> State:
|
|
145
|
-
self.
|
|
147
|
+
if self._node_execution_logging:
|
|
148
|
+
self._logger.debug("Run node: Invoke LLM")
|
|
146
149
|
try:
|
|
147
150
|
ai_response = self._agent.invoke({"messages": state["messages"]})
|
|
148
151
|
except Exception as e:
|
|
@@ -165,7 +168,8 @@ class DMAIAgent:
|
|
|
165
168
|
return state
|
|
166
169
|
|
|
167
170
|
def _execute_tool_node(self, state: State) -> State:
|
|
168
|
-
self.
|
|
171
|
+
if self._node_execution_logging:
|
|
172
|
+
self._logger.debug("Run node: Execute tool")
|
|
169
173
|
threads = []
|
|
170
174
|
|
|
171
175
|
for tool_call in state["messages"][-1].tool_calls:
|
|
@@ -58,7 +58,8 @@ class DMAioAIAgent(DMAIAgent):
|
|
|
58
58
|
return state["new_messages"]
|
|
59
59
|
|
|
60
60
|
async def _invoke_llm_node(self, state: State, second_attempt: bool = False) -> State:
|
|
61
|
-
self.
|
|
61
|
+
if self._node_execution_logging:
|
|
62
|
+
self._logger.debug("Run node: Invoke LLM")
|
|
62
63
|
try:
|
|
63
64
|
ai_response = await self._agent.ainvoke({"messages": state["messages"]})
|
|
64
65
|
except Exception as e:
|
|
@@ -81,7 +82,8 @@ class DMAioAIAgent(DMAIAgent):
|
|
|
81
82
|
return state
|
|
82
83
|
|
|
83
84
|
async def _execute_tool_node(self, state: State) -> State:
|
|
84
|
-
self.
|
|
85
|
+
if self._node_execution_logging:
|
|
86
|
+
self._logger.debug("Run node: Execute tool")
|
|
85
87
|
tasks = []
|
|
86
88
|
|
|
87
89
|
for tool_call in state["messages"][-1].tool_calls:
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dm-aioaiagent
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.7
|
|
4
4
|
Summary: This is my custom aioaiagent client
|
|
5
5
|
Home-page: https://pypi.org/project/dm-aioaiagent
|
|
6
6
|
Author: dimka4621
|
|
7
7
|
Author-email: mismartconfig@gmail.com
|
|
8
8
|
Project-URL: GitHub, https://github.com/MykhLibs/dm-aioaiagent
|
|
9
9
|
Keywords: dm aioaiagent
|
|
10
|
-
Classifier: Programming Language :: Python :: 3.
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
11
11
|
Classifier: License :: OSI Approved :: MIT License
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
13
|
Requires-Python: >=3.9
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
15
15
|
Requires-Dist: dm-logger<0.7.0,>=0.6.6
|
|
16
|
-
Requires-Dist: python-dotenv
|
|
16
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
17
17
|
Requires-Dist: pydantic<3.0.0,>=2.9.2
|
|
18
18
|
Requires-Dist: langchain<0.4.0,>=0.3.0
|
|
19
19
|
Requires-Dist: langchain-core<0.4.0,>=0.3.5
|
|
@@ -8,7 +8,7 @@ def readme():
|
|
|
8
8
|
|
|
9
9
|
setup(
|
|
10
10
|
name='dm-aioaiagent',
|
|
11
|
-
version='v0.5.
|
|
11
|
+
version='v0.5.7',
|
|
12
12
|
author='dimka4621',
|
|
13
13
|
author_email='mismartconfig@gmail.com',
|
|
14
14
|
description='This is my custom aioaiagent client',
|
|
@@ -18,7 +18,7 @@ setup(
|
|
|
18
18
|
packages=find_packages(),
|
|
19
19
|
install_requires=[
|
|
20
20
|
'dm-logger>=0.6.6, <0.7.0',
|
|
21
|
-
'python-dotenv>=1.0.0
|
|
21
|
+
'python-dotenv>=1.0.0',
|
|
22
22
|
'pydantic>=2.9.2, <3.0.0',
|
|
23
23
|
'langchain>=0.3.0, <0.4.0',
|
|
24
24
|
'langchain-core>=0.3.5, <0.4.0',
|
|
@@ -30,7 +30,7 @@ setup(
|
|
|
30
30
|
'grandalf>=0.8.0, <0.9.0',
|
|
31
31
|
],
|
|
32
32
|
classifiers=[
|
|
33
|
-
'Programming Language :: Python :: 3.
|
|
33
|
+
'Programming Language :: Python :: 3.9',
|
|
34
34
|
'License :: OSI Approved :: MIT License',
|
|
35
35
|
'Operating System :: OS Independent'
|
|
36
36
|
],
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|