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 message handling in deepseek-reasoner #45

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jasonkneen
Copy link

@jasonkneen jasonkneen commented Jan 22, 2025

Fixes #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.

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
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.

deepseek-reasoner does not support successive user or assistant messages
1 participant