mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 00:28:31 +00:00
better
This commit is contained in:
@@ -135,6 +135,10 @@ class BaseAgent(ABC, BaseModel):
|
|||||||
default=None,
|
default=None,
|
||||||
description="Knowledge sources for the agent.",
|
description="Knowledge sources for the agent.",
|
||||||
)
|
)
|
||||||
|
custom_knowledge_storage: Optional[Any] = Field(
|
||||||
|
default=None,
|
||||||
|
description="Custom knowledge storage for the agent.",
|
||||||
|
)
|
||||||
|
|
||||||
@model_validator(mode="before")
|
@model_validator(mode="before")
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -272,9 +276,7 @@ class BaseAgent(ABC, BaseModel):
|
|||||||
**copied_data,
|
**copied_data,
|
||||||
llm=existing_llm,
|
llm=existing_llm,
|
||||||
tools=self.tools,
|
tools=self.tools,
|
||||||
knowledge_sources=self.knowledge_sources
|
knowledge_sources=getattr(self, "knowledge_sources", None),
|
||||||
if hasattr(self, "knowledge_sources")
|
|
||||||
else None,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
return copied_agent
|
return copied_agent
|
||||||
|
|||||||
Reference in New Issue
Block a user