dm-aioaiagent 0.4.5__tar.gz → 0.4.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.4.5 → dm_aioaiagent-0.4.7}/PKG-INFO +1 -1
- {dm_aioaiagent-0.4.5 → dm_aioaiagent-0.4.7}/dm_aioaiagent/ai_agent.py +6 -2
- {dm_aioaiagent-0.4.5 → dm_aioaiagent-0.4.7}/dm_aioaiagent/async_ai_agent.py +0 -4
- {dm_aioaiagent-0.4.5 → dm_aioaiagent-0.4.7}/dm_aioaiagent.egg-info/PKG-INFO +1 -1
- {dm_aioaiagent-0.4.5 → dm_aioaiagent-0.4.7}/setup.py +1 -1
- {dm_aioaiagent-0.4.5 → dm_aioaiagent-0.4.7}/README.md +0 -0
- {dm_aioaiagent-0.4.5 → dm_aioaiagent-0.4.7}/dm_aioaiagent/__init__.py +0 -0
- {dm_aioaiagent-0.4.5 → dm_aioaiagent-0.4.7}/dm_aioaiagent/openai_image_message_content.py +0 -0
- {dm_aioaiagent-0.4.5 → dm_aioaiagent-0.4.7}/dm_aioaiagent/types.py +0 -0
- {dm_aioaiagent-0.4.5 → dm_aioaiagent-0.4.7}/dm_aioaiagent.egg-info/SOURCES.txt +0 -0
- {dm_aioaiagent-0.4.5 → dm_aioaiagent-0.4.7}/dm_aioaiagent.egg-info/dependency_links.txt +0 -0
- {dm_aioaiagent-0.4.5 → dm_aioaiagent-0.4.7}/dm_aioaiagent.egg-info/requires.txt +0 -0
- {dm_aioaiagent-0.4.5 → dm_aioaiagent-0.4.7}/dm_aioaiagent.egg-info/top_level.txt +0 -0
- {dm_aioaiagent-0.4.5 → dm_aioaiagent-0.4.7}/setup.cfg +0 -0
|
@@ -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,
|
|
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,4 +1,3 @@
|
|
|
1
|
-
import sys
|
|
2
1
|
import uuid
|
|
3
2
|
import asyncio
|
|
4
3
|
from typing import Any
|
|
@@ -7,9 +6,6 @@ from langchain_core.messages import AIMessage, ToolMessage
|
|
|
7
6
|
from .ai_agent import DMAIAgent
|
|
8
7
|
from .types import *
|
|
9
8
|
|
|
10
|
-
if sys.platform == "win32":
|
|
11
|
-
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
|
|
12
|
-
|
|
13
9
|
__all__ = ["DMAioAIAgent"]
|
|
14
10
|
|
|
15
11
|
|
|
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
|