Fix message handling in deepseek-reasoner#45
Open
jasonkneen wants to merge 2 commits intodeepseek-ai:mainfrom
Open
Fix message handling in deepseek-reasoner#45jasonkneen wants to merge 2 commits intodeepseek-ai:mainfrom
jasonkneen wants to merge 2 commits intodeepseek-ai:mainfrom
Conversation
Fixes deepseek-ai#21 Add support for successive user or assistant messages in `deepseek-reasoner`. * **deepseek_reasoner.py**: - Modify the message handling logic to allow successive messages of the same role. - Add a check to merge successive messages of the same role into a single message. - Update the `process_messages` function to handle the new message format. * **README.md**: - Add a section explaining the new message handling capability. - Provide examples of how to format messages with successive user or assistant messages. * **test_deepseek_reasoner.py**: - Add tests to ensure the model correctly processes successive user or assistant messages. - Include test cases for both interleaved and successive messages. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/deepseek-ai/DeepSeek-R1/issues/21?shareId=XXXX-XXXX-XXXX-XXXX).
…e role * Remove check for interleaved user and assistant messages
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #21
Add support for successive user or assistant messages in
deepseek-reasoner.deepseek_reasoner.py:
process_messagesfunction to handle the new message format.README.md:
test_deepseek_reasoner.py:
For more details, open the Copilot Workspace session.