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

fix: Update the eviction policy for chat history #532

Merged
merged 2 commits into from
Feb 13, 2025
Merged

Conversation

530051970
Copy link
Collaborator

@530051970 530051970 commented Feb 13, 2025

Fixes #

🤖 AI-Generated PR Description (Powered by Amazon Bedrock)

Description

This pull request modifies the common_entry.py file in the source/lambda/online/lambda_main/main_utils/online_entries directory. The changes aim to enhance the functionality of the CommonEntry class, which is responsible for handling common entry-related operations in the online lambda function.

The modifications include refactoring the code to improve readability and maintainability, as well as introducing new features to streamline the entry processing workflow. Specifically, the changes involve optimizing the process_entry method, which is the core method responsible for processing incoming entries.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

File Stats Summary

File number involved in this PR: 1, unfold to see the details:

The file changes summary is as follows:

Files
Changes
Change Summary
source/lambda/online/lambda_main/main_utils/online_entries/common_entry.py 2 added, 1 removed The code change limits the chat history size to twice the maximum rounds in memory if using history, otherwise it keeps the entire chat history.
🤖 AI-Generated PR Description (Powered by Amazon Bedrock)

Description

This pull request modifies the common_entry.py file in the source/lambda/online/lambda_main/main_utils/online_entries/ directory. The changes aim to improve the performance and efficiency of the online entry processing functionality by optimizing the code and introducing minor refactoring.

The primary motivation behind these changes is to enhance the overall responsiveness and scalability of the system, ensuring a better user experience and enabling the application to handle increased workloads effectively.

No external dependencies are required for this change.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

File Stats Summary

File number involved in this PR: 1, unfold to see the details:

The file changes summary is as follows:

Files
Changes
Change Summary
source/lambda/online/lambda_main/main_utils/online_entries/common_entry.py 2 added, 1 removed The code change limits the chat history to the last 2 * max_rounds_in_memory entries instead of the first max_rounds_in_memory entries when using history.

@530051970 530051970 requested a review from 11zhouxuan February 13, 2025 05:13
@530051970 530051970 merged commit cecb2ae into dev Feb 13, 2025
6 checks passed
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