Replies: 1 comment 1 reply
-
|
I think creating a new chat makes a lot of sense. You could add a pointer to the compacted chat in the previous one and the view layer would handle showing both seamlessly? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to figure out the most RubyLLM way to compact the context during long conversations. For a basic "lazy" approach, I want to rescue a token limit error, compact the context and continue the response.
One option is creating a new
chatwith the compacted context, but I don't love this approach since it should still show as a single chat thread to the user.Another option is creating a new system message with the compacted context and only passing new messages since the new system message to the llm. I don't see a built-in way to scope the messages sent to the llm other than using raw content blocks, but I'm happy to contribute if it's something that would be considered as in scope for RubyLLM.
Any other ideas I might be overlooking?
Beta Was this translation helpful? Give feedback.
All reactions