minimaxir / simpleaichat

Python package for easily interfacing with chat apps, with robust features and minimal code complexity.
MIT License
3.49k stars 229 forks source link

Compressed session memory? #100

Closed ymyke closed 11 months ago

ymyke commented 11 months ago

As far as I understand simpleaichat just sends the earlier conversation along in order to support chat sessions. This approach will exceed the model's token limit quickly in cases, where the original context has already been substantial.

I don't think there is a way to have simpleaichat to compress the earlier conversation, I'll have to implement that outside of simpleaichat. Or did I miss something?

Is anybody aware of a great library that does that?

Thanks!

batmanscode commented 11 months ago

I've used LangChain to do this

https://python.langchain.com/docs/modules/memory/types/summary_buffer

ymyke commented 11 months ago

Thanks, @batmanscode!