dm-aioaiagent 0.4.5__tar.gz → 0.4.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.2
2
2
  Name: dm-aioaiagent
3
- Version: 0.4.5
3
+ Version: 0.4.6
4
4
  Summary: This is my custom aioaiagent client
5
5
  Home-page: https://pypi.org/project/dm-aioaiagent
6
6
  Author: dimka4621
@@ -205,18 +205,22 @@ class DMAIAgent:
205
205
  from langchain_anthropic import ChatAnthropic
206
206
 
207
207
  llm = ChatAnthropic(**base_kwargs)
208
+ bind_tool_kwargs = {"tool_choice": {
209
+ "type": "auto",
210
+ "disable_parallel_tool_use": not self._parallel_tool_calls
211
+ }}
208
212
  else:
209
213
  from langchain_openai import ChatOpenAI
210
214
 
211
215
  llm = ChatOpenAI(**base_kwargs)
216
+ bind_tool_kwargs = {"parallel_tool_calls": self._parallel_tool_calls}
212
217
 
213
218
  if self._is_tools_exists:
214
219
  self._tool_map = {t.name: t for t in self._tools}
215
- llm = llm.bind_tools(self._tools, parallel_tool_calls=self._parallel_tool_calls)
220
+ llm = llm.bind_tools(self._tools, **bind_tool_kwargs)
216
221
 
217
222
  prompt = ChatPromptTemplate.from_messages([SystemMessage(content=self._system_message),
218
223
  MessagesPlaceholder(variable_name="messages")])
219
-
220
224
  self._agent = prompt | llm
221
225
 
222
226
  def _init_graph(self) -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: dm-aioaiagent
3
- Version: 0.4.5
3
+ Version: 0.4.6
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.4.5',
11
+ version='v0.4.6',
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