Skip to content
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

feat: add additional memory classes and do some cleanup #132

Merged
merged 6 commits into from
Feb 4, 2024

Conversation

hiptopjones
Copy link
Contributor

  • Added a handful of memory types, including ConversationSummaryMemory, which keeps a running summary of the conversation, rather than the raw buffer of messages.
  • Tried to clean up some of the memory classes and make them more consistent with langchain. Pulled in documentation for the classes where possible.
  • Improved the memory example code to allow working with different memory types.
  • LoadMemoryChain was demanding a specific memory type (ConversationBufferMemory), so I made changes there to allow using other types of memory.
  • Code in GroupChat and ReActAgentExecutorChain was breaking some of the abstraction of the memory classes, so I tried to fix it. I am not sure how they are used or if those classes are actually in use, so I was unable to really test those changes.
  • I tried to create a common place to handle message formatting. There is code all over the tree that does it similarly, but uses its own implementation. Suggest trying to unify that formatting where possible going forward.

@HavenDV HavenDV requested a review from TesAnti February 4, 2024 02:03
@HavenDV
Copy link
Contributor

HavenDV commented Feb 4, 2024

Overall it looks very good. I love the detailed comments and attention to detail.
I've added a couple of comments, but since this is a fairly significant change, I'd like to hear a little review from @TesAnti if he has time

@HavenDV HavenDV merged commit 2166560 into tryAGI:main Feb 4, 2024
2 checks passed
@hiptopjones hiptopjones deleted the memory-cleanup branch February 4, 2024 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants