Skip to content

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