mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-16 06:53:16 +00:00
core[patch]: use args_schema doc for tool description (#23503)
This commit is contained in:
@@ -44,6 +44,8 @@ def test_unnamed_decorator() -> None:
|
||||
|
||||
|
||||
class _MockSchema(BaseModel):
|
||||
"""Return the arguments directly."""
|
||||
|
||||
arg1: int
|
||||
arg2: bool
|
||||
arg3: Optional[dict] = None
|
||||
@@ -133,7 +135,6 @@ def test_decorator_with_specified_schema() -> None:
|
||||
|
||||
@tool(args_schema=_MockSchema)
|
||||
def tool_func(arg1: int, arg2: bool, arg3: Optional[dict] = None) -> str:
|
||||
"""Return the arguments directly."""
|
||||
return f"{arg1} {arg2} {arg3}"
|
||||
|
||||
assert isinstance(tool_func, BaseTool)
|
||||
|
Reference in New Issue
Block a user