feat: Enhance agent knowledge setup with optional crew embedder (#2232)

- Modify `Agent` class to add `set_knowledge` method
- Allow setting embedder from crew-level configuration
- Remove `_set_knowledge` method from initialization
- Update `Crew` class to set agent knowledge during agent setup
- Add default implementation in `BaseAgent` for compatibility
This commit is contained in:
Lorenze Jay
2025-02-26 09:10:43 -08:00
committed by GitHub
parent 34d2993456
commit 1e8ee247ca
3 changed files with 8 additions and 2 deletions

View File

@@ -351,3 +351,6 @@ class BaseAgent(ABC, BaseModel):
if not self._rpm_controller:
self._rpm_controller = rpm_controller
self.create_agent_executor()
def set_knowledge(self, crew_embedder: Optional[Dict[str, Any]] = None):
pass