You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.Optimized the issue of poor language adherence in replies.
2.Optimized the system prompt by moving the content of the current conversation to the user section to ensure the immutability of the system prompt.
3.Added a pipeline for concurrent submission to OV on a per-user basis in multi-user scenarios.
Related Issue
Type of Change
Bug fix (non-breaking change that fixes an issue)
New feature (non-breaking change that adds functionality)
Breaking change (fix or feature that would cause existing functionality to not work as expected)
Documentation update
Refactoring (no functional changes)
Performance improvement
Test update
Changes Made
Testing
I have added tests that prove my fix is effective or that my feature works
New and existing unit tests pass locally with my changes
I have tested this on the following platforms:
Linux
macOS
Windows
Checklist
My code follows the project's coding style
I have performed a self-review of my code
I have commented my code, particularly in hard-to-understand areas
I have made corresponding changes to the documentation
My changes generate no new warnings
Any dependent changes have been merged and published
The hook's return value changed from the direct client.commit result to a custom dict. This will break any code that relies on the original return structure.
The new prompt line ends with "User's query:" but does not include the actual user query. This prevents the LLM from seeing the user's message in this section. Include current_message to complete the prompt.
-parts.append("Reply in the same language as the user's query, ignoring the language of the reference materials. User's query:")+parts.append(f"Reply in the same language as the user's query, ignoring the language of the reference materials. User's query:\n{current_message}")
Suggestion importance[1-10]: 8
__
Why: The original prompt line ends with "User's query:" but does not include the actual query, which could lead to the LLM not seeing the user's message in that context. Including current_message fixes this critical issue.
Medium
General
Log individual user commit failures
When using return_exceptions=True, individual task failures are collected but not logged. Add logging for any exceptions in user_results to improve debuggability.
# 等待所有用户任务完成
user_results = await asyncio.gather(*user_tasks, return_exceptions=True)
+# Log any individual user commit failures+for user_id, result in zip(messages_by_sender.keys(), user_results):+ if isinstance(result, Exception):+ logger.exception(f"Failed to commit memory for user {user_id}", exc_info=result)
Suggestion importance[1-10]: 5
__
Why: Adding logging for exceptions in user_results improves debuggability when individual user commit tasks fail, which is a helpful but not critical improvement.
Low
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
1.Optimized the issue of poor language adherence in replies.
2.Optimized the system prompt by moving the content of the current conversation to the user section to ensure the immutability of the system prompt.
3.Added a pipeline for concurrent submission to OV on a per-user basis in multi-user scenarios.
Related Issue
Type of Change
Changes Made
Testing
Checklist
Screenshots (if applicable)
Additional Notes