The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
core[patch]: tool import fix (#25419)
Bagatur2494cecabf6f
diff --git a/libs/core/langchain_core/tools/__init__.py b/libs/core/langchain_core/tools/__init__.pyindex 9c3b61f4b0..3553ff10ec 100644--- a/libs/core/langchain_core/tools/__init__.py+++ b/libs/core/langchain_core/tools/__init__.py@@ -45,12 +45,14 @@ from langchain_core.tools.convert import (convert_runnable_to_tool as convert_runnable_to_tool,)from langchain_core.tools.convert import tool as tool+from langchain_core.tools.render import ToolsRenderer as ToolsRendererfrom langchain_core.tools.render import (render_text_description as render_text_description,)from langchain_core.tools.render import (render_text_description_and_args as render_text_description_and_args,)+from langchain_core.tools.retriever import RetrieverInput as RetrieverInputfrom langchain_core.tools.retriever import (create_retriever_tool as create_retriever_tool,)diff --git a/libs/core/tests/unit_tests/test_tools.py b/libs/core/tests/unit_tests/test_tools.pyindex ef7e20d803..cd6d843ac2 100644--- a/libs/core/tests/unit_tests/test_tools.py+++ b/libs/core/tests/unit_tests/test_tools.py@@ -25,6 +25,7 @@ import pytestfrom pydantic import BaseModel as BaseModelProper # pydantic: ignorefrom typing_extensions import Annotated, TypedDict, TypeVar+from langchain_core import toolsfrom langchain_core.callbacks import (AsyncCallbackManagerForToolRun,CallbackManagerForToolRun,@@ -1904,3 +1905,26 @@ def test_tool_args_schema_pydantic_v2_with_metadata() -> None:assert foo.invoke({"x": [0] * 10})with pytest.raises(ValidationErrorV2):foo.invoke({"x": [0] * 9})+++def test_imports() -> None:+ expected_all = [+ "FILTERED_ARGS",+ "SchemaAnnotationError",+ "create_schema_from_function",+ "ToolException",+ "BaseTool",+ "Tool",+ "StructuredTool",+ "tool",+ "RetrieverInput",+ "create_retriever_tool",+ "ToolsRenderer",+ "render_text_description",+ "render_text_description_and_args",+ "BaseToolkit",+ "convert_runnable_to_tool",+ "InjectedToolArg",+ ]+ for module_name in expected_all:+ assert hasattr(tools, module_name) and getattr(tools, module_name) is not None