langchain-dev-utils 1.1.13__py3-none-any.whl → 1.1.14__py3-none-any.whl
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/__init__.py +1 -1
- langchain_dev_utils/agents/factory.py +27 -23
- langchain_dev_utils/agents/middleware/plan.py +1 -0
- langchain_dev_utils/chat_models/base.py +1 -1
- {langchain_dev_utils-1.1.13.dist-info → langchain_dev_utils-1.1.14.dist-info}/METADATA +1 -1
- {langchain_dev_utils-1.1.13.dist-info → langchain_dev_utils-1.1.14.dist-info}/RECORD +8 -8
- {langchain_dev_utils-1.1.13.dist-info → langchain_dev_utils-1.1.14.dist-info}/WHEEL +0 -0
- {langchain_dev_utils-1.1.13.dist-info → langchain_dev_utils-1.1.14.dist-info}/licenses/LICENSE +0 -0
langchain_dev_utils/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "1.1.
|
|
1
|
+
__version__ = "1.1.14"
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
from typing import Any, Sequence
|
|
2
|
-
from typing import Callable
|
|
2
|
+
from typing import Callable
|
|
3
3
|
|
|
4
|
-
from langchain.agents import
|
|
5
|
-
from langchain.agents.
|
|
6
|
-
|
|
4
|
+
from langchain.agents import create_agent as _create_agent
|
|
5
|
+
from langchain.agents.middleware.types import (
|
|
6
|
+
AgentMiddleware,
|
|
7
|
+
AgentState,
|
|
8
|
+
ResponseT,
|
|
9
|
+
_InputAgentState,
|
|
10
|
+
_OutputAgentState,
|
|
11
|
+
)
|
|
7
12
|
from langchain.agents.structured_output import ResponseFormat
|
|
8
13
|
from langchain_core.tools import BaseTool
|
|
9
14
|
from langgraph.cache.base import BaseCache
|
|
@@ -31,7 +36,9 @@ def create_agent( # noqa: PLR0915
|
|
|
31
36
|
debug: bool = False,
|
|
32
37
|
name: str | None = None,
|
|
33
38
|
cache: BaseCache | None = None,
|
|
34
|
-
) -> CompiledStateGraph
|
|
39
|
+
) -> CompiledStateGraph[
|
|
40
|
+
AgentState[ResponseT], ContextT, _InputAgentState, _OutputAgentState[ResponseT]
|
|
41
|
+
]:
|
|
35
42
|
"""
|
|
36
43
|
Create a prebuilt agent with string-based model specification.
|
|
37
44
|
|
|
@@ -80,22 +87,19 @@ def create_agent( # noqa: PLR0915
|
|
|
80
87
|
... })
|
|
81
88
|
>>> response
|
|
82
89
|
"""
|
|
83
|
-
return
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
name=name,
|
|
99
|
-
cache=cache,
|
|
100
|
-
),
|
|
90
|
+
return _create_agent(
|
|
91
|
+
model=load_chat_model(model),
|
|
92
|
+
tools=tools,
|
|
93
|
+
system_prompt=system_prompt,
|
|
94
|
+
middleware=middleware,
|
|
95
|
+
response_format=response_format,
|
|
96
|
+
state_schema=state_schema,
|
|
97
|
+
context_schema=context_schema,
|
|
98
|
+
checkpointer=checkpointer,
|
|
99
|
+
store=store,
|
|
100
|
+
interrupt_before=interrupt_before,
|
|
101
|
+
interrupt_after=interrupt_after,
|
|
102
|
+
debug=debug,
|
|
103
|
+
name=name,
|
|
104
|
+
cache=cache,
|
|
101
105
|
)
|
|
@@ -287,6 +287,7 @@ class PlanMiddleware(AgentMiddleware):
|
|
|
287
287
|
If not provided, uses the default `_DEFAULT_READ_PLAN_TOOL_DESCRIPTION`.
|
|
288
288
|
use_read_plan_tool: Whether to use the `read_plan` tool.
|
|
289
289
|
If not provided, uses the default `True`.
|
|
290
|
+
message_key: The key of the message to be updated. Defaults to "messages".
|
|
290
291
|
Example:
|
|
291
292
|
```python
|
|
292
293
|
from langchain_dev_utils.agents.middleware.plan import PlanMiddleware
|
|
@@ -3,9 +3,9 @@ from typing import Any, NotRequired, Optional, TypedDict, cast
|
|
|
3
3
|
from langchain.chat_models.base import _SUPPORTED_PROVIDERS, _init_chat_model_helper
|
|
4
4
|
from langchain_core.language_models.chat_models import BaseChatModel
|
|
5
5
|
from langchain_core.utils import from_env
|
|
6
|
+
from pydantic import BaseModel
|
|
6
7
|
|
|
7
8
|
from .types import ChatModelType, ToolChoiceType
|
|
8
|
-
from pydantic import BaseModel
|
|
9
9
|
|
|
10
10
|
_MODEL_PROVIDERS_DICT = {}
|
|
11
11
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: langchain-dev-utils
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.14
|
|
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
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
langchain_dev_utils/__init__.py,sha256=
|
|
1
|
+
langchain_dev_utils/__init__.py,sha256=mqdNVCi4IalSmo5XOmgqpcssoVNsIsPLW08ykYdHXYU,23
|
|
2
2
|
langchain_dev_utils/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
langchain_dev_utils/agents/__init__.py,sha256=e17SMQdJIQngbUCr2N1tY-yw0tD3tEnH7PSvyDmVPeQ,127
|
|
4
|
-
langchain_dev_utils/agents/factory.py,sha256=
|
|
4
|
+
langchain_dev_utils/agents/factory.py,sha256=h4uAkid2NJMMs4qV6RYFexew-ixfhEvpa254eDeDEcU,3912
|
|
5
5
|
langchain_dev_utils/agents/file_system.py,sha256=S6RUEmQI2eerW0gBQp0IP0X5ak5FwvqgIGRiycr2iyw,8468
|
|
6
6
|
langchain_dev_utils/agents/plan.py,sha256=ydJuJLlNydheQvLPl2uCc3TBVv42YxGzPhKgtldIdIk,6497
|
|
7
7
|
langchain_dev_utils/agents/wrap.py,sha256=4BWksU9DRz8c3ZHQiUi4GHwGhNysDLNs8pmLWV7BeAI,5165
|
|
8
8
|
langchain_dev_utils/agents/middleware/__init__.py,sha256=cjrb8Rue5uukl9pKPF7CjSrHtcYsUBj3Mdvv2szlp7E,679
|
|
9
9
|
langchain_dev_utils/agents/middleware/model_fallback.py,sha256=cvTj_sOw3r4B4ErMAVdsrniMImWnUpLMECmQErxdsUU,1688
|
|
10
10
|
langchain_dev_utils/agents/middleware/model_router.py,sha256=YkaPpYmIZaGj--YlUjm7dVcNzRt3Au317eor4SDYsQs,8799
|
|
11
|
-
langchain_dev_utils/agents/middleware/plan.py,sha256=
|
|
11
|
+
langchain_dev_utils/agents/middleware/plan.py,sha256=ew9AiJLgLawnlBpiqBPXxyT9CZ1i4aqtwlbi_Qbly4w,15282
|
|
12
12
|
langchain_dev_utils/agents/middleware/summarization.py,sha256=Ws-_cxSQQfa5rn5Spq1gSLpgIleUCno3QmWRvN4-u9E,2213
|
|
13
13
|
langchain_dev_utils/agents/middleware/tool_emulator.py,sha256=u9rV24yUB-dyc1uUfUe74B1wOGVI3TZRwxkE1bvGm18,2025
|
|
14
14
|
langchain_dev_utils/agents/middleware/tool_selection.py,sha256=ZqdyK4Yhp2u3GM6B_D6U7Srca9vy1o7s6N_LrV24-dQ,3107
|
|
15
15
|
langchain_dev_utils/chat_models/__init__.py,sha256=YSLUyHrWEEj4y4DtGFCOnDW02VIYZdfAH800m4Klgeg,224
|
|
16
|
-
langchain_dev_utils/chat_models/base.py,sha256=
|
|
16
|
+
langchain_dev_utils/chat_models/base.py,sha256=l2833l9RuTnS3OecoRL2RWeYc17kLWoC6nuWWUpo5FU,11232
|
|
17
17
|
langchain_dev_utils/chat_models/types.py,sha256=oPXFsfho9amnwek5v3ey8LcnsfKVzecWSJcKVBG4ETc,261
|
|
18
18
|
langchain_dev_utils/chat_models/adapters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
19
|
langchain_dev_utils/chat_models/adapters/openai_compatible.py,sha256=6ZTRCFqgW8fk8nbZs0OarmuHP5M6wr-0mbFogZuLTWY,18409
|
|
@@ -29,7 +29,7 @@ langchain_dev_utils/pipeline/types.py,sha256=T3aROKKXeWvd0jcH5XkgMDQfEkLfPaiOhhV
|
|
|
29
29
|
langchain_dev_utils/tool_calling/__init__.py,sha256=mu_WxKMcu6RoTf4vkTPbA1WSBSNc6YIqyBtOQ6iVQj4,322
|
|
30
30
|
langchain_dev_utils/tool_calling/human_in_the_loop.py,sha256=nbaON9806pv5tpMRQUA_Ch3HJA5HBFgzZR7kQRf6PiY,9819
|
|
31
31
|
langchain_dev_utils/tool_calling/utils.py,sha256=3cNv_Zx32KxdsGn8IkxjWUzxYEEwVJeJgTZTbfSg0pA,2751
|
|
32
|
-
langchain_dev_utils-1.1.
|
|
33
|
-
langchain_dev_utils-1.1.
|
|
34
|
-
langchain_dev_utils-1.1.
|
|
35
|
-
langchain_dev_utils-1.1.
|
|
32
|
+
langchain_dev_utils-1.1.14.dist-info/METADATA,sha256=VqNoa-IeJpZsKauWp1An3t1amgCCypyDH2xPiUwoVsk,16264
|
|
33
|
+
langchain_dev_utils-1.1.14.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
34
|
+
langchain_dev_utils-1.1.14.dist-info/licenses/LICENSE,sha256=AWAOzNEcsvCEzHOF0qby5OKxviVH_eT9Yce1sgJTico,1084
|
|
35
|
+
langchain_dev_utils-1.1.14.dist-info/RECORD,,
|
|
File without changes
|
{langchain_dev_utils-1.1.13.dist-info → langchain_dev_utils-1.1.14.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|