mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 08:08:32 +00:00
Adding two default arguments to cache function
This commit is contained in:
@@ -20,7 +20,7 @@ class BaseTool(BaseModel, ABC):
|
|||||||
"""The schema for the arguments that the tool accepts."""
|
"""The schema for the arguments that the tool accepts."""
|
||||||
description_updated: bool = False
|
description_updated: bool = False
|
||||||
"""Flag to check if the description has been updated."""
|
"""Flag to check if the description has been updated."""
|
||||||
cache_function: Optional[Callable] = lambda: True
|
cache_function: Optional[Callable] = lambda _args, _result: True
|
||||||
"""Function that will be used to determine if the tool should be cached, should return a boolean. If None, the tool will be cached."""
|
"""Function that will be used to determine if the tool should be cached, should return a boolean. If None, the tool will be cached."""
|
||||||
|
|
||||||
@validator("args_schema", always=True, pre=True)
|
@validator("args_schema", always=True, pre=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user