-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removing LangChain and Rebuilding Executor #1322
Conversation
Not to hijack the original intention here but could this be an opportunity to adds support for user defined memory instance as well? So instead of the current implementation like # current
@model_validator(mode="after")
def create_crew_memory(self) -> "Crew":
"""Set private attributes."""
if self.memory:
self._long_term_memory = LongTermMemory()
self._short_term_memory = ShortTermMemory(
crew=self, embedder_config=self.embedder
)
self._entity_memory = EntityMemory(crew=self, embedder_config=self.embedder)
return self
# Allow custom user memory instances
@model_validator(mode="after")
def create_crew_memory(self) -> "Crew":
"""Set private attributes."""
if self.memory:
self._long_term_memory =self.long_term_memory if self.long_term_memory else LongTermMemory()
self._short_term_memory = self.short_term_memory if self.short_term_memory else ShortTermMemory(
crew=self, embedder_config=self.embedder
)
self._entity_memory = self.entity_memory if self.entity_memory else EntityMemory(crew=self, embedder_config=self.embedder)
return self One advantage of this is when user that wants to use different database aside from Chroma for example or some more powerful persistence RAG instance to power the memory. What do you think? |
I like the idea @thehapyone but will separate in another PR given how big this one got 😅 |
I have working setup and I can create a PR for that soon. |
|
Implemented here - #1339 |
We kept overriding the Agent Executor for long enough, in order to support some of the new features we want to add we need a finer control, so this is a big refactoring that removes langchain as a dependency while still supporting their tools.
This refactor also improves features like:
use_system_prompt
on the Agentuse_stop_words
on the Agentrespect_context_window
, and enable by default