mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-26 13:59:49 +00:00
core[patch]: consolidate conditional in BaseTool (#16530)
- **Description:** Refactor contradictory conditional to single line - **Issue:** #16528
This commit is contained in:
@@ -111,8 +111,7 @@ class BaseTool(RunnableSerializable[Union[str, Dict], Any]):
|
||||
|
||||
args_schema_type = cls.__annotations__.get("args_schema", None)
|
||||
|
||||
if args_schema_type is not None:
|
||||
if args_schema_type is None or args_schema_type == BaseModel:
|
||||
if args_schema_type is not None and args_schema_type == BaseModel:
|
||||
# Throw errors for common mis-annotations.
|
||||
# TODO: Use get_args / get_origin and fully
|
||||
# specify valid annotations.
|
||||
|
Reference in New Issue
Block a user