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

Chat optimization around tokens and keeping important messages in history #393

Merged
merged 15 commits into from
Jan 22, 2025

Conversation

JuliaS92
Copy link
Collaborator

@JuliaS92 JuliaS92 commented Jan 14, 2025

This is some optimization of the chat with regards to tokens and forgetting messages.
New:

  • Function to estimate tokens
  • Constants for message keys and roles
  • Max_tokens can now be parameterized
  • Message key pinned
  • Message key in_context
  • Markdown line below chat output showing pin and token number
  • Messages are only discarded if they are not pinned

Adresses:
https://github.com/orgs/MannLabs/projects/12/views/1?filterQuery=component%3Aalphapeptstats&pane=issue&itemId=88109495
https://github.com/orgs/MannLabs/projects/12/views/1?filterQuery=component%3Aalphapeptstats&pane=issue&itemId=93499513

@JuliaS92 JuliaS92 changed the base branch from main to development January 14, 2025 10:33
@JuliaS92 JuliaS92 marked this pull request as ready for review January 14, 2025 14:14
Copy link
Contributor

@mschwoer mschwoer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Collaborator

@boopthesnoot boopthesnoot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@JuliaS92 JuliaS92 enabled auto-merge January 22, 2025 08:27
@JuliaS92 JuliaS92 merged commit 57de2c7 into development Jan 22, 2025
5 checks passed
@JuliaS92 JuliaS92 deleted the chat_optimization branch January 22, 2025 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants