langchain-dev-utils 1.3.5__tar.gz → 1.3.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.
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/PKG-INFO +1 -1
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/pyproject.toml +1 -1
- langchain_dev_utils-1.3.6/src/langchain_dev_utils/__init__.py +1 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/_utils.py +6 -1
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/agents/wrap.py +99 -49
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/tests/test_wrap_agent.py +12 -8
- langchain_dev_utils-1.3.5/src/langchain_dev_utils/__init__.py +0 -1
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/.gitignore +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/.python-version +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/.vscode/settings.json +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/LICENSE +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/README.md +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/README_cn.md +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/agents/__init__.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/agents/factory.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/agents/file_system.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/agents/middleware/__init__.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/agents/middleware/format_prompt.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/agents/middleware/handoffs.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/agents/middleware/model_fallback.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/agents/middleware/model_router.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/agents/middleware/plan.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/agents/middleware/summarization.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/agents/middleware/tool_call_repair.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/agents/middleware/tool_emulator.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/agents/middleware/tool_selection.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/agents/plan.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/chat_models/__init__.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/chat_models/adapters/__init__.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/chat_models/adapters/create_utils.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/chat_models/adapters/openai_compatible.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/chat_models/adapters/register_profiles.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/chat_models/base.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/chat_models/types.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/embeddings/__init__.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/embeddings/adapters/__init__.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/embeddings/adapters/create_utils.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/embeddings/adapters/openai_compatible.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/embeddings/base.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/message_convert/__init__.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/message_convert/content.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/message_convert/format.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/pipeline/__init__.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/pipeline/parallel.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/pipeline/sequential.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/pipeline/types.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/py.typed +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/tool_calling/__init__.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/tool_calling/human_in_the_loop.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/tool_calling/utils.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/tests/__init__.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/tests/test_agent.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/tests/test_chat_models.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/tests/test_embedding.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/tests/test_handoffs_middleware.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/tests/test_human_in_the_loop.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/tests/test_load_embbeding.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/tests/test_load_model.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/tests/test_messages.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/tests/test_model_tool_emulator.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/tests/test_pipline.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/tests/test_plan_middleware.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/tests/test_router_model.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/tests/test_tool_call_repair.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/tests/test_tool_calling.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/tests/utils/__init__.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/tests/utils/register.py +0 -0
- {langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: langchain-dev-utils
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.6
|
|
4
4
|
Summary: A practical utility library for LangChain and LangGraph development
|
|
5
5
|
Project-URL: Source Code, https://github.com/TBice123123/langchain-dev-utils
|
|
6
6
|
Project-URL: repository, https://github.com/TBice123123/langchain-dev-utils
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.3.6"
|
|
@@ -97,6 +97,11 @@ def _validate_model_cls_name(model_cls_name: str) -> None:
|
|
|
97
97
|
f"model_cls_name should start with an uppercase letter (PEP 8). Received: {model_cls_name}"
|
|
98
98
|
)
|
|
99
99
|
|
|
100
|
+
if len(model_cls_name) > 30:
|
|
101
|
+
raise ValueError(
|
|
102
|
+
f"model_cls_name must be 30 characters or fewer. Received: {model_cls_name}"
|
|
103
|
+
)
|
|
104
|
+
|
|
100
105
|
|
|
101
106
|
def _validate_provider_name(provider_name: str) -> None:
|
|
102
107
|
"""Validate provider name follows Python naming conventions.
|
|
@@ -112,7 +117,7 @@ def _validate_provider_name(provider_name: str) -> None:
|
|
|
112
117
|
|
|
113
118
|
if not provider_name[0].isalnum():
|
|
114
119
|
raise ValueError(
|
|
115
|
-
f"provider_name must start with a letter. Received: {provider_name}"
|
|
120
|
+
f"provider_name must start with a letter or number. Received: {provider_name}"
|
|
116
121
|
)
|
|
117
122
|
|
|
118
123
|
if not all(c.isalnum() or c == "_" for c in provider_name):
|
{langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/agents/wrap.py
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import asyncio
|
|
2
|
-
from typing import Any, Awaitable, Callable, Optional
|
|
2
|
+
from typing import Any, Awaitable, Callable, Optional
|
|
3
3
|
|
|
4
4
|
from langchain.tools import ToolRuntime
|
|
5
|
-
from langchain_core.messages import
|
|
5
|
+
from langchain_core.messages import HumanMessage
|
|
6
6
|
from langchain_core.tools import BaseTool, StructuredTool
|
|
7
7
|
from langgraph.graph.state import CompiledStateGraph
|
|
8
8
|
|
|
@@ -14,9 +14,9 @@ def _process_input(request: str, runtime: ToolRuntime) -> str:
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
def _process_output(
|
|
17
|
-
request: str, response:
|
|
17
|
+
request: str, response: dict[str, Any], runtime: ToolRuntime
|
|
18
18
|
) -> Any:
|
|
19
|
-
return response[-1].content
|
|
19
|
+
return response["messages"][-1].content
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
def wrap_agent_as_tool(
|
|
@@ -25,17 +25,17 @@ def wrap_agent_as_tool(
|
|
|
25
25
|
tool_description: Optional[str] = None,
|
|
26
26
|
pre_input_hooks: Optional[
|
|
27
27
|
tuple[
|
|
28
|
-
Callable[[str, ToolRuntime], str],
|
|
29
|
-
Callable[[str, ToolRuntime], Awaitable[str]],
|
|
28
|
+
Callable[[str, ToolRuntime], str | dict[str, Any]],
|
|
29
|
+
Callable[[str, ToolRuntime], Awaitable[str | dict[str, Any]]],
|
|
30
30
|
]
|
|
31
|
-
| Callable[[str, ToolRuntime], str]
|
|
31
|
+
| Callable[[str, ToolRuntime], str | dict[str, Any]]
|
|
32
32
|
] = None,
|
|
33
33
|
post_output_hooks: Optional[
|
|
34
34
|
tuple[
|
|
35
|
-
Callable[[str,
|
|
36
|
-
Callable[[str,
|
|
35
|
+
Callable[[str, dict[str, Any], ToolRuntime], Any],
|
|
36
|
+
Callable[[str, dict[str, Any], ToolRuntime], Awaitable[Any]],
|
|
37
37
|
]
|
|
38
|
-
| Callable[[str,
|
|
38
|
+
| Callable[[str, dict[str, Any], ToolRuntime], Any]
|
|
39
39
|
] = None,
|
|
40
40
|
) -> BaseTool:
|
|
41
41
|
"""Wraps an agent as a tool
|
|
@@ -91,33 +91,58 @@ def wrap_agent_as_tool(
|
|
|
91
91
|
def call_agent(
|
|
92
92
|
request: str,
|
|
93
93
|
runtime: ToolRuntime,
|
|
94
|
-
)
|
|
95
|
-
|
|
94
|
+
):
|
|
95
|
+
_processed_input = process_input(request, runtime) if process_input else request
|
|
96
|
+
if isinstance(_processed_input, str):
|
|
97
|
+
agent_input = {"messages": [HumanMessage(content=_processed_input)]}
|
|
98
|
+
elif isinstance(_processed_input, dict):
|
|
99
|
+
if "messages" not in _processed_input:
|
|
100
|
+
raise ValueError("Agent input must contain 'messages' key")
|
|
101
|
+
agent_input = _processed_input
|
|
102
|
+
else:
|
|
103
|
+
raise ValueError("Pre Hooks must return a string or a dict")
|
|
96
104
|
|
|
97
|
-
|
|
98
|
-
response = agent.invoke({"messages": messages})
|
|
105
|
+
response = agent.invoke(agent_input)
|
|
99
106
|
|
|
100
|
-
response =
|
|
107
|
+
response = (
|
|
108
|
+
process_output(request, response, runtime)
|
|
109
|
+
if process_output
|
|
110
|
+
else response["messages"][-1].content
|
|
111
|
+
)
|
|
101
112
|
return response
|
|
102
113
|
|
|
103
114
|
async def acall_agent(
|
|
104
115
|
request: str,
|
|
105
116
|
runtime: ToolRuntime,
|
|
106
|
-
)
|
|
117
|
+
):
|
|
107
118
|
if asyncio.iscoroutinefunction(process_input_async):
|
|
108
|
-
|
|
119
|
+
_processed_input = await process_input_async(request, runtime)
|
|
120
|
+
else:
|
|
121
|
+
_processed_input = (
|
|
122
|
+
process_input_async(request, runtime)
|
|
123
|
+
if process_input_async
|
|
124
|
+
else request
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
if isinstance(_processed_input, str):
|
|
128
|
+
agent_input = {"messages": [HumanMessage(content=_processed_input)]}
|
|
129
|
+
elif isinstance(_processed_input, dict):
|
|
130
|
+
if "messages" not in _processed_input:
|
|
131
|
+
raise ValueError("Agent input must contain 'messages' key")
|
|
132
|
+
agent_input = _processed_input
|
|
109
133
|
else:
|
|
110
|
-
|
|
134
|
+
raise ValueError("Pre Hooks must return a string or a dict")
|
|
111
135
|
|
|
112
|
-
|
|
113
|
-
response = await agent.ainvoke({"messages": messages})
|
|
136
|
+
response = await agent.ainvoke(agent_input)
|
|
114
137
|
|
|
115
138
|
if asyncio.iscoroutinefunction(process_output_async):
|
|
116
|
-
response = await process_output_async(
|
|
117
|
-
request, response["messages"], runtime
|
|
118
|
-
)
|
|
139
|
+
response = await process_output_async(request, response, runtime)
|
|
119
140
|
else:
|
|
120
|
-
response =
|
|
141
|
+
response = (
|
|
142
|
+
process_output(request, response, runtime)
|
|
143
|
+
if process_output
|
|
144
|
+
else response["messages"][-1].content
|
|
145
|
+
)
|
|
121
146
|
|
|
122
147
|
return response
|
|
123
148
|
|
|
@@ -143,17 +168,17 @@ def wrap_all_agents_as_tool(
|
|
|
143
168
|
tool_description: Optional[str] = None,
|
|
144
169
|
pre_input_hooks: Optional[
|
|
145
170
|
tuple[
|
|
146
|
-
Callable[[str, ToolRuntime], str],
|
|
147
|
-
Callable[[str, ToolRuntime], Awaitable[str]],
|
|
171
|
+
Callable[[str, ToolRuntime], str | dict[str, Any]],
|
|
172
|
+
Callable[[str, ToolRuntime], Awaitable[str | dict[str, Any]]],
|
|
148
173
|
]
|
|
149
|
-
| Callable[[str, ToolRuntime], str]
|
|
174
|
+
| Callable[[str, ToolRuntime], str | dict[str, Any]]
|
|
150
175
|
] = None,
|
|
151
176
|
post_output_hooks: Optional[
|
|
152
177
|
tuple[
|
|
153
|
-
Callable[[str,
|
|
154
|
-
Callable[[str,
|
|
178
|
+
Callable[[str, dict[str, Any], ToolRuntime], Any],
|
|
179
|
+
Callable[[str, dict[str, Any], ToolRuntime], Awaitable[Any]],
|
|
155
180
|
]
|
|
156
|
-
| Callable[[str,
|
|
181
|
+
| Callable[[str, dict[str, Any], ToolRuntime], Any]
|
|
157
182
|
] = None,
|
|
158
183
|
) -> BaseTool:
|
|
159
184
|
"""Wraps all agents as single tool
|
|
@@ -219,42 +244,67 @@ def wrap_all_agents_as_tool(
|
|
|
219
244
|
agent_name: str,
|
|
220
245
|
description: str,
|
|
221
246
|
runtime: ToolRuntime,
|
|
222
|
-
)
|
|
223
|
-
task_description = (
|
|
224
|
-
process_input(description, runtime) if process_input else description
|
|
225
|
-
)
|
|
226
|
-
|
|
247
|
+
):
|
|
227
248
|
if agent_name not in agents_map:
|
|
228
249
|
raise ValueError(f"Agent {agent_name} not found")
|
|
229
250
|
|
|
230
|
-
|
|
231
|
-
|
|
251
|
+
_processed_input = (
|
|
252
|
+
process_input(description, runtime) if process_input else description
|
|
253
|
+
)
|
|
254
|
+
if isinstance(_processed_input, str):
|
|
255
|
+
agent_input = {"messages": [HumanMessage(content=_processed_input)]}
|
|
256
|
+
elif isinstance(_processed_input, dict):
|
|
257
|
+
if "messages" not in _processed_input:
|
|
258
|
+
raise ValueError("Agent input must contain 'messages' key")
|
|
259
|
+
agent_input = _processed_input
|
|
260
|
+
else:
|
|
261
|
+
raise ValueError("Pre Hooks must return str or dict")
|
|
262
|
+
|
|
263
|
+
response = agent.invoke(agent_input)
|
|
232
264
|
|
|
233
|
-
response =
|
|
265
|
+
response = (
|
|
266
|
+
process_output(description, response, runtime)
|
|
267
|
+
if process_output
|
|
268
|
+
else response["messages"][-1].content
|
|
269
|
+
)
|
|
234
270
|
return response
|
|
235
271
|
|
|
236
272
|
async def acall_agent(
|
|
237
273
|
agent_name: str,
|
|
238
274
|
description: str,
|
|
239
275
|
runtime: ToolRuntime,
|
|
240
|
-
)
|
|
276
|
+
):
|
|
277
|
+
if agent_name not in agents_map:
|
|
278
|
+
raise ValueError(f"Agent {agent_name} not found")
|
|
279
|
+
|
|
241
280
|
if asyncio.iscoroutinefunction(process_input_async):
|
|
242
|
-
|
|
281
|
+
_processed_input = await process_input_async(description, runtime)
|
|
243
282
|
else:
|
|
244
|
-
|
|
283
|
+
_processed_input = (
|
|
284
|
+
process_input_async(description, runtime)
|
|
285
|
+
if process_input_async
|
|
286
|
+
else description
|
|
287
|
+
)
|
|
245
288
|
|
|
246
|
-
if
|
|
247
|
-
|
|
289
|
+
if isinstance(_processed_input, str):
|
|
290
|
+
agent_input = {"messages": [HumanMessage(content=_processed_input)]}
|
|
291
|
+
elif isinstance(_processed_input, dict):
|
|
292
|
+
if "messages" not in _processed_input:
|
|
293
|
+
raise ValueError("Agent input must contain 'messages' key")
|
|
294
|
+
agent_input = _processed_input
|
|
295
|
+
else:
|
|
296
|
+
raise ValueError("Pre Hooks must return str or dict")
|
|
248
297
|
|
|
249
|
-
|
|
250
|
-
response = await agents_map[agent_name].ainvoke({"messages": messages})
|
|
298
|
+
response = await agents_map[agent_name].ainvoke(agent_input)
|
|
251
299
|
|
|
252
300
|
if asyncio.iscoroutinefunction(process_output_async):
|
|
253
|
-
response = await process_output_async(
|
|
254
|
-
task_description, response["messages"], runtime
|
|
255
|
-
)
|
|
301
|
+
response = await process_output_async(description, response, runtime)
|
|
256
302
|
else:
|
|
257
|
-
response =
|
|
303
|
+
response = (
|
|
304
|
+
process_output(description, response, runtime)
|
|
305
|
+
if process_output
|
|
306
|
+
else response["messages"][-1].content
|
|
307
|
+
)
|
|
258
308
|
|
|
259
309
|
return response
|
|
260
310
|
|
|
@@ -31,18 +31,22 @@ async def process_input_async(request: str, runtime: ToolRuntime) -> str:
|
|
|
31
31
|
return "<task_description>" + request + "</task_description>"
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
def process_output(request: str,
|
|
35
|
-
|
|
36
|
-
assert
|
|
37
|
-
|
|
34
|
+
def process_output(request: str, response: dict[str, Any], runtime: ToolRuntime) -> str:
|
|
35
|
+
human_message = response["messages"][0]
|
|
36
|
+
assert human_message.content.startswith(
|
|
37
|
+
"<task_description>"
|
|
38
|
+
) and human_message.content.endswith("</task_description>")
|
|
39
|
+
return "<task_response>" + response["messages"][-1].content + "</task_response>"
|
|
38
40
|
|
|
39
41
|
|
|
40
42
|
async def process_output_async(
|
|
41
|
-
request: str,
|
|
43
|
+
request: str, response: dict[str, Any], runtime: ToolRuntime
|
|
42
44
|
) -> str:
|
|
43
|
-
|
|
44
|
-
assert
|
|
45
|
-
|
|
45
|
+
human_message = response["messages"][0]
|
|
46
|
+
assert human_message.content.startswith(
|
|
47
|
+
"<task_description>"
|
|
48
|
+
) and human_message.content.endswith("</task_description>")
|
|
49
|
+
return "<task_response>" + response["messages"][-1].content + "</task_response>"
|
|
46
50
|
|
|
47
51
|
|
|
48
52
|
def test_wrap_agent():
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.3.5"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/agents/__init__.py
RENAMED
|
File without changes
|
{langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/agents/factory.py
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/agents/plan.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/chat_models/base.py
RENAMED
|
File without changes
|
{langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/chat_models/types.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/embeddings/base.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/pipeline/__init__.py
RENAMED
|
File without changes
|
{langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/pipeline/parallel.py
RENAMED
|
File without changes
|
|
File without changes
|
{langchain_dev_utils-1.3.5 → langchain_dev_utils-1.3.6}/src/langchain_dev_utils/pipeline/types.py
RENAMED
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|