mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 00:28:31 +00:00
add lru caching
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import datetime
|
||||
import os
|
||||
from functools import lru_cache
|
||||
from typing import Any, Optional, Type
|
||||
|
||||
import requests
|
||||
@@ -54,6 +55,7 @@ class BraveSearchTool(BaseTool):
|
||||
"BRAVE_API_KEY environment variable is required for BraveSearchTool"
|
||||
)
|
||||
|
||||
@lru_cache(maxsize=100)
|
||||
def _run(
|
||||
self,
|
||||
**kwargs: Any,
|
||||
|
||||
Reference in New Issue
Block a user