langchain-dev-utils 1.2.2__tar.gz → 1.2.3__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.
Files changed (53) hide show
  1. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/PKG-INFO +5 -5
  2. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/README.md +4 -4
  3. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/README_cn.md +1 -1
  4. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/pyproject.toml +1 -1
  5. langchain_dev_utils-1.2.3/src/langchain_dev_utils/__init__.py +1 -0
  6. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/src/langchain_dev_utils/agents/middleware/model_fallback.py +1 -1
  7. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/src/langchain_dev_utils/agents/middleware/plan.py +5 -1
  8. langchain_dev_utils-1.2.2/src/langchain_dev_utils/__init__.py +0 -1
  9. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/.gitignore +0 -0
  10. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/.python-version +0 -0
  11. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/.vscode/settings.json +0 -0
  12. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/LICENSE +0 -0
  13. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/src/langchain_dev_utils/agents/__init__.py +0 -0
  14. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/src/langchain_dev_utils/agents/factory.py +0 -0
  15. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/src/langchain_dev_utils/agents/file_system.py +0 -0
  16. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/src/langchain_dev_utils/agents/middleware/__init__.py +0 -0
  17. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/src/langchain_dev_utils/agents/middleware/model_router.py +0 -0
  18. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/src/langchain_dev_utils/agents/middleware/summarization.py +0 -0
  19. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/src/langchain_dev_utils/agents/middleware/tool_emulator.py +0 -0
  20. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/src/langchain_dev_utils/agents/middleware/tool_selection.py +0 -0
  21. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/src/langchain_dev_utils/agents/plan.py +0 -0
  22. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/src/langchain_dev_utils/agents/wrap.py +0 -0
  23. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/src/langchain_dev_utils/chat_models/__init__.py +0 -0
  24. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/src/langchain_dev_utils/chat_models/adapters/__init__.py +0 -0
  25. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/src/langchain_dev_utils/chat_models/adapters/openai_compatible.py +0 -0
  26. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/src/langchain_dev_utils/chat_models/base.py +0 -0
  27. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/src/langchain_dev_utils/chat_models/types.py +0 -0
  28. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/src/langchain_dev_utils/embeddings/__init__.py +0 -0
  29. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/src/langchain_dev_utils/embeddings/base.py +0 -0
  30. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/src/langchain_dev_utils/message_convert/__init__.py +0 -0
  31. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/src/langchain_dev_utils/message_convert/content.py +0 -0
  32. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/src/langchain_dev_utils/message_convert/format.py +0 -0
  33. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/src/langchain_dev_utils/pipeline/__init__.py +0 -0
  34. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/src/langchain_dev_utils/pipeline/parallel.py +0 -0
  35. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/src/langchain_dev_utils/pipeline/sequential.py +0 -0
  36. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/src/langchain_dev_utils/pipeline/types.py +0 -0
  37. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/src/langchain_dev_utils/py.typed +0 -0
  38. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/src/langchain_dev_utils/tool_calling/__init__.py +0 -0
  39. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/src/langchain_dev_utils/tool_calling/human_in_the_loop.py +0 -0
  40. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/src/langchain_dev_utils/tool_calling/utils.py +0 -0
  41. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/tests/test_agent.py +0 -0
  42. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/tests/test_chat_models.py +0 -0
  43. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/tests/test_human_in_the_loop.py +0 -0
  44. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/tests/test_load_embbeding.py +0 -0
  45. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/tests/test_load_model.py +0 -0
  46. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/tests/test_messages.py +0 -0
  47. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/tests/test_model_tool_emulator.py +0 -0
  48. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/tests/test_pipline.py +0 -0
  49. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/tests/test_plan_middleware.py +0 -0
  50. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/tests/test_router_model.py +0 -0
  51. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/tests/test_tool_calling.py +0 -0
  52. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/tests/test_wrap_agent.py +0 -0
  53. {langchain_dev_utils-1.2.2 → langchain_dev_utils-1.2.3}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langchain-dev-utils
3
- Version: 1.2.2
3
+ Version: 1.2.3
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
@@ -171,7 +171,7 @@ text = format_sequence([
171
171
  ], separator="\n", with_num=True)
172
172
  ```
173
173
 
174
- **For more information about message conversion, please refer to**: [Message Processing](https://tbice123123.github.io/langchain-dev-utils-docs/en/message-conversion/message.html), [Format List Content](https://tbice123123.github.io/langchain-dev-utils-docs/en/message-conversion/format.html)
174
+ **For more information about message conversion, please refer to**: [Message Process](https://tbice123123.github.io/langchain-dev-utils-docs/en/message-conversion/message.html), [Formatting List Content](https://tbice123123.github.io/langchain-dev-utils-docs/en/message-conversion/format.html)
175
175
 
176
176
  ### 3. **Tool Calling**
177
177
 
@@ -231,7 +231,7 @@ def get_current_time() -> str:
231
231
  return str(datetime.datetime.now().timestamp())
232
232
  ```
233
233
 
234
- **For more information about tool calling, please refer to**: [Add Human-in-the-Loop Support](https://tbice123123.github.io/langchain-dev-utils-docs/en/tool-calling/human-in-the-loop.html), [Tool Call Processing](https://tbice123123.github.io/langchain-dev-utils-docs/en/tool-calling/tool.html)
234
+ **For more information about tool calling, please refer to**: [Add Human-in-the-Loop Support](https://tbice123123.github.io/langchain-dev-utils-docs/en/tool-calling/human-in-the-loop.html), [Tool Call Handling](https://tbice123123.github.io/langchain-dev-utils-docs/en/tool-calling/tool.html)
235
235
 
236
236
  ### 4. **Agent Development**
237
237
 
@@ -278,7 +278,7 @@ response = agent.invoke({"messages": [{"role": "user", "content": "Give me a tra
278
278
  print(response)
279
279
  ```
280
280
 
281
- **For more information about agent development and all built-in middleware, please refer to**: [Prebuilt Agent Functions](https://tbice123123.github.io/langchain-dev-utils-docs/en/agent-development/prebuilt.html), [Middleware](https://tbice123123.github.io/langchain-dev-utils-docs/en/agent-development/middleware.html)
281
+ **For more information about agent development and all built-in middleware, please refer to**: [Pre-built Agent Functions](https://tbice123123.github.io/langchain-dev-utils-docs/en/agent-development/prebuilt.html), [Middleware](https://tbice123123.github.io/langchain-dev-utils-docs/en/agent-development/middleware.html)
282
282
 
283
283
  ### 5. **State Graph Orchestration**
284
284
 
@@ -391,7 +391,7 @@ response = graph.invoke({"messages": [HumanMessage("Hello")]})
391
391
  print(response)
392
392
  ```
393
393
 
394
- **For more information about state graph orchestration, please refer to**: [State Graph Orchestration Pipeline](https://tbice123123.github.io/langchain-dev-utils-docs/en/graph-orchestration/pipeline.html)
394
+ **For more information about state graph orchestration, please refer to**: [State Graph Orchestration](https://tbice123123.github.io/langchain-dev-utils-docs/en/graph-orchestration/pipeline.html)
395
395
 
396
396
  ## 💬 Join the Community
397
397
 
@@ -155,7 +155,7 @@ text = format_sequence([
155
155
  ], separator="\n", with_num=True)
156
156
  ```
157
157
 
158
- **For more information about message conversion, please refer to**: [Message Processing](https://tbice123123.github.io/langchain-dev-utils-docs/en/message-conversion/message.html), [Format List Content](https://tbice123123.github.io/langchain-dev-utils-docs/en/message-conversion/format.html)
158
+ **For more information about message conversion, please refer to**: [Message Process](https://tbice123123.github.io/langchain-dev-utils-docs/en/message-conversion/message.html), [Formatting List Content](https://tbice123123.github.io/langchain-dev-utils-docs/en/message-conversion/format.html)
159
159
 
160
160
  ### 3. **Tool Calling**
161
161
 
@@ -215,7 +215,7 @@ def get_current_time() -> str:
215
215
  return str(datetime.datetime.now().timestamp())
216
216
  ```
217
217
 
218
- **For more information about tool calling, please refer to**: [Add Human-in-the-Loop Support](https://tbice123123.github.io/langchain-dev-utils-docs/en/tool-calling/human-in-the-loop.html), [Tool Call Processing](https://tbice123123.github.io/langchain-dev-utils-docs/en/tool-calling/tool.html)
218
+ **For more information about tool calling, please refer to**: [Add Human-in-the-Loop Support](https://tbice123123.github.io/langchain-dev-utils-docs/en/tool-calling/human-in-the-loop.html), [Tool Call Handling](https://tbice123123.github.io/langchain-dev-utils-docs/en/tool-calling/tool.html)
219
219
 
220
220
  ### 4. **Agent Development**
221
221
 
@@ -262,7 +262,7 @@ response = agent.invoke({"messages": [{"role": "user", "content": "Give me a tra
262
262
  print(response)
263
263
  ```
264
264
 
265
- **For more information about agent development and all built-in middleware, please refer to**: [Prebuilt Agent Functions](https://tbice123123.github.io/langchain-dev-utils-docs/en/agent-development/prebuilt.html), [Middleware](https://tbice123123.github.io/langchain-dev-utils-docs/en/agent-development/middleware.html)
265
+ **For more information about agent development and all built-in middleware, please refer to**: [Pre-built Agent Functions](https://tbice123123.github.io/langchain-dev-utils-docs/en/agent-development/prebuilt.html), [Middleware](https://tbice123123.github.io/langchain-dev-utils-docs/en/agent-development/middleware.html)
266
266
 
267
267
  ### 5. **State Graph Orchestration**
268
268
 
@@ -375,7 +375,7 @@ response = graph.invoke({"messages": [HumanMessage("Hello")]})
375
375
  print(response)
376
376
  ```
377
377
 
378
- **For more information about state graph orchestration, please refer to**: [State Graph Orchestration Pipeline](https://tbice123123.github.io/langchain-dev-utils-docs/en/graph-orchestration/pipeline.html)
378
+ **For more information about state graph orchestration, please refer to**: [State Graph Orchestration](https://tbice123123.github.io/langchain-dev-utils-docs/en/graph-orchestration/pipeline.html)
379
379
 
380
380
  ## 💬 Join the Community
381
381
 
@@ -375,7 +375,7 @@ response = graph.invoke({"messages": [HumanMessage("你好")]})
375
375
  print(response)
376
376
  ```
377
377
 
378
- **对于更多关于状态图编排的相关介绍,请参考**: [状态图编排管道](https://tbice123123.github.io/langchain-dev-utils-docs/zh/graph-orchestration/pipeline.html)
378
+ **对于更多关于状态图编排的相关介绍,请参考**: [状态图编排](https://tbice123123.github.io/langchain-dev-utils-docs/zh/graph-orchestration/pipeline.html)
379
379
 
380
380
  ## 💬 加入社区
381
381
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "langchain-dev-utils"
3
- version = "1.2.2"
3
+ version = "1.2.3"
4
4
  description = "A practical utility library for LangChain and LangGraph development"
5
5
  readme = "README.md"
6
6
  authors = [{ name = "tiebingice", email = "tiebingice123@outlook.com" }]
@@ -0,0 +1 @@
1
+ __version__ = "1.2.3"
@@ -17,7 +17,7 @@ class ModelFallbackMiddleware(_ModelFallbackMiddleware):
17
17
 
18
18
  Example:
19
19
  ```python
20
- from langchain_dev_utils.agents.middleware.model_fallback import ModelFallbackMiddleware
20
+ from langchain_dev_utils.agents.middleware import ModelFallbackMiddleware
21
21
  from langchain_dev_utils.agents import create_agent
22
22
 
23
23
  fallback = ModelFallbackMiddleware(
@@ -250,6 +250,8 @@ _PLAN_SYSTEM_PROMPT_NOT_READ_PLAN = """You can manage task plans using two simpl
250
250
  ## finish_sub_plan
251
251
  - Call it **only when the current task is 100% done**. It automatically marks it `"done"` and promotes the next `"pending"` task to `"in_progress"`. No parameters needed. Never use it mid-task or if anything’s incomplete.
252
252
  Keep plans lean, update immediately, and never batch completions.
253
+
254
+ **Note**: Make sure that all tasks end up with the status `"done"`.
253
255
  """
254
256
 
255
257
  _PLAN_SYSTEM_PROMPT = """You can manage task plans using three simple tools:
@@ -263,6 +265,8 @@ _PLAN_SYSTEM_PROMPT = """You can manage task plans using three simple tools:
263
265
  ## read_plan
264
266
  - Retrieve the full current plan list with statuses, especially when you forget which sub-plan you're supposed to execute next.
265
267
  - No parameters required—returns a current plan list with statuses.
268
+
269
+ **Note**: Make sure that all tasks end up with the status `"done"`.
266
270
  """
267
271
 
268
272
 
@@ -290,7 +294,7 @@ class PlanMiddleware(AgentMiddleware):
290
294
  message_key: The key of the message to be updated. Defaults to "messages".
291
295
  Example:
292
296
  ```python
293
- from langchain_dev_utils.agents.middleware.plan import PlanMiddleware
297
+ from langchain_dev_utils.agents.middleware import PlanMiddleware
294
298
  from langchain_dev_utils.agents import create_agent
295
299
 
296
300
  agent = create_agent("vllm:qwen3-4b", middleware=[PlanMiddleware()])
@@ -1 +0,0 @@
1
- __version__ = "1.2.2"