-
Notifications
You must be signed in to change notification settings - Fork 336
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
moved history methods to WorkingMemory #977
base: develop
Are you sure you want to change the base?
moved history methods to WorkingMemory #977
Conversation
Hi! Thanks for the PR, did you check for the imports in the codebase about these methods that should be fixed? |
core/cat/memory/working_memory.py
Outdated
|
||
""" | ||
|
||
history = self.working_memory.history[-latest_n:] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this should be self.history[-latest_n:]
, isn't it?
core/cat/memory/working_memory.py
Outdated
return history_string | ||
|
||
def langchainfy_chat_history(self, latest_n: int = 5) -> List[BaseMessage]: | ||
chat_history = self.working_memory.history[-latest_n:] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I missed it. I'm going to fix it now.
I fixed the syntax for a variable that belong to the same file of the function where the variable is used
For the imports in codebase @zAlweNy26, I checked in which files the methods were called but I didn't see a direct import to the old file stray_cat where they were, so I didn't edit it. Maybe I didn't read it correctly ? |
https://github.com/search?q=repo%3Acheshire-cat-ai%2Fcore%20langchainfy_chat_history&type=code |
I updated the code on my branch because i read it on contributing.md, is it wrong ? |
I'm getting confused, I commited and pushed on my branch but if i search for the methods it's like nothing changed, what i'm doing wrong |
Description
This is my first time doing a pr, I hope I didn't mess something
I moved the methods
langchainfy_chat_history
andstringify_chat_history
fromStrayCat
toWorkingMemory
.Related to issue #975
Type of change
Checklist: