Better agent execution error handling (#54)

A few quality of life improvements around cache handling and repeated tool usage
This commit is contained in:
João Moura
2024-01-05 11:04:59 -03:00
committed by GitHub
parent 5602160caf
commit 13bb3abf57
16 changed files with 38 additions and 43 deletions

14
crewai/agents/cache/cache_hit.py vendored Normal file
View File

@@ -0,0 +1,14 @@
from langchain_core.agents import AgentAction
from pydantic.v1 import BaseModel, Field
from .cache_handler import CacheHandler
class CacheHit(BaseModel):
"""Cache Hit Object."""
class Config:
arbitrary_types_allowed = True
action: AgentAction = Field(description="Action taken")
cache: CacheHandler = Field(description="Cache Handler for the tool")