dm-aioaiagent 0.5.4__tar.gz → 0.5.6__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.4
3
+ Version: 0.5.6
4
4
  Summary: This is my custom aioaiagent client
5
5
  Home-page: https://pypi.org/project/dm-aioaiagent
6
6
  Author: dimka4621
@@ -12,17 +12,17 @@ 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
- Requires-Dist: dm-logger~=0.6.2
16
- Requires-Dist: python-dotenv>=1.0.0
15
+ Requires-Dist: dm-logger<0.7.0,>=0.6.6
16
+ Requires-Dist: python-dotenv<1.1.0,>=1.0.0
17
17
  Requires-Dist: pydantic<3.0.0,>=2.9.2
18
- Requires-Dist: langchain~=0.3.0
19
- Requires-Dist: langchain-core~=0.3.5
20
- Requires-Dist: langchain-community~=0.3.0
21
- Requires-Dist: langchain-openai~=0.3.0
22
- Requires-Dist: langchain-anthropic~=0.3.0
23
- Requires-Dist: langgraph~=0.2.23
24
- Requires-Dist: langsmith~=0.1.144
25
- Requires-Dist: grandalf>=0.8
18
+ Requires-Dist: langchain<0.4.0,>=0.3.0
19
+ Requires-Dist: langchain-core<0.4.0,>=0.3.5
20
+ Requires-Dist: langchain-community<0.4.0,>=0.3.0
21
+ Requires-Dist: langchain-openai<0.4.0,>=0.3.0
22
+ Requires-Dist: langchain-anthropic<0.4.0,>=0.3.0
23
+ Requires-Dist: langgraph<0.4.0,>=0.3.23
24
+ Requires-Dist: langsmith<0.4.0,>=0.3.45
25
+ Requires-Dist: grandalf<0.9.0,>=0.8.0
26
26
  Dynamic: author
27
27
  Dynamic: author-email
28
28
  Dynamic: classifier
@@ -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._logger.debug("Run node: Invoke LLM")
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._logger.debug("Run node: Execute tool")
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._logger.debug("Run node: Invoke LLM")
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._logger.debug("Run node: Execute tool")
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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dm-aioaiagent
3
- Version: 0.5.4
3
+ Version: 0.5.6
4
4
  Summary: This is my custom aioaiagent client
5
5
  Home-page: https://pypi.org/project/dm-aioaiagent
6
6
  Author: dimka4621
@@ -12,17 +12,17 @@ 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
- Requires-Dist: dm-logger~=0.6.2
16
- Requires-Dist: python-dotenv>=1.0.0
15
+ Requires-Dist: dm-logger<0.7.0,>=0.6.6
16
+ Requires-Dist: python-dotenv<1.1.0,>=1.0.0
17
17
  Requires-Dist: pydantic<3.0.0,>=2.9.2
18
- Requires-Dist: langchain~=0.3.0
19
- Requires-Dist: langchain-core~=0.3.5
20
- Requires-Dist: langchain-community~=0.3.0
21
- Requires-Dist: langchain-openai~=0.3.0
22
- Requires-Dist: langchain-anthropic~=0.3.0
23
- Requires-Dist: langgraph~=0.2.23
24
- Requires-Dist: langsmith~=0.1.144
25
- Requires-Dist: grandalf>=0.8
18
+ Requires-Dist: langchain<0.4.0,>=0.3.0
19
+ Requires-Dist: langchain-core<0.4.0,>=0.3.5
20
+ Requires-Dist: langchain-community<0.4.0,>=0.3.0
21
+ Requires-Dist: langchain-openai<0.4.0,>=0.3.0
22
+ Requires-Dist: langchain-anthropic<0.4.0,>=0.3.0
23
+ Requires-Dist: langgraph<0.4.0,>=0.3.23
24
+ Requires-Dist: langsmith<0.4.0,>=0.3.45
25
+ Requires-Dist: grandalf<0.9.0,>=0.8.0
26
26
  Dynamic: author
27
27
  Dynamic: author-email
28
28
  Dynamic: classifier
@@ -0,0 +1,11 @@
1
+ dm-logger<0.7.0,>=0.6.6
2
+ python-dotenv<1.1.0,>=1.0.0
3
+ pydantic<3.0.0,>=2.9.2
4
+ langchain<0.4.0,>=0.3.0
5
+ langchain-core<0.4.0,>=0.3.5
6
+ langchain-community<0.4.0,>=0.3.0
7
+ langchain-openai<0.4.0,>=0.3.0
8
+ langchain-anthropic<0.4.0,>=0.3.0
9
+ langgraph<0.4.0,>=0.3.23
10
+ langsmith<0.4.0,>=0.3.45
11
+ grandalf<0.9.0,>=0.8.0
@@ -8,7 +8,7 @@ def readme():
8
8
 
9
9
  setup(
10
10
  name='dm-aioaiagent',
11
- version='v0.5.4',
11
+ version='v0.5.6',
12
12
  author='dimka4621',
13
13
  author_email='mismartconfig@gmail.com',
14
14
  description='This is my custom aioaiagent client',
@@ -17,17 +17,17 @@ setup(
17
17
  url='https://pypi.org/project/dm-aioaiagent',
18
18
  packages=find_packages(),
19
19
  install_requires=[
20
- 'dm-logger~=0.6.2',
21
- 'python-dotenv>=1.0.0',
22
- 'pydantic>=2.9.2, < 3.0.0',
23
- 'langchain~=0.3.0',
24
- 'langchain-core~=0.3.5',
25
- 'langchain-community~=0.3.0',
26
- 'langchain-openai~=0.3.0',
27
- 'langchain-anthropic~=0.3.0',
28
- 'langgraph~=0.2.23',
29
- 'langsmith~=0.1.144',
30
- 'grandalf>=0.8',
20
+ 'dm-logger>=0.6.6, <0.7.0',
21
+ 'python-dotenv>=1.0.0, <1.1.0',
22
+ 'pydantic>=2.9.2, <3.0.0',
23
+ 'langchain>=0.3.0, <0.4.0',
24
+ 'langchain-core>=0.3.5, <0.4.0',
25
+ 'langchain-community>=0.3.0, <0.4.0',
26
+ 'langchain-openai>=0.3.0, <0.4.0',
27
+ 'langchain-anthropic>=0.3.0, <0.4.0',
28
+ 'langgraph>=0.3.23, <0.4.0',
29
+ 'langsmith>=0.3.45, <0.4.0',
30
+ 'grandalf>=0.8.0, <0.9.0',
31
31
  ],
32
32
  classifiers=[
33
33
  'Programming Language :: Python :: 3.8',
@@ -1,11 +0,0 @@
1
- dm-logger~=0.6.2
2
- python-dotenv>=1.0.0
3
- pydantic<3.0.0,>=2.9.2
4
- langchain~=0.3.0
5
- langchain-core~=0.3.5
6
- langchain-community~=0.3.0
7
- langchain-openai~=0.3.0
8
- langchain-anthropic~=0.3.0
9
- langgraph~=0.2.23
10
- langsmith~=0.1.144
11
- grandalf>=0.8
File without changes
File without changes