From 80f9613959f17bf867866fb6b4ecdce218fce633 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Moura?= Date: Wed, 27 Mar 2024 15:04:35 -0300 Subject: [PATCH] Adding two default arguments to cache function --- src/crewai_tools/tools/base_tool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crewai_tools/tools/base_tool.py b/src/crewai_tools/tools/base_tool.py index 961688629..e8e497859 100644 --- a/src/crewai_tools/tools/base_tool.py +++ b/src/crewai_tools/tools/base_tool.py @@ -20,7 +20,7 @@ class BaseTool(BaseModel, ABC): """The schema for the arguments that the tool accepts.""" description_updated: bool = False """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.""" @validator("args_schema", always=True, pre=True)