Skip to content

[REQUEST] Imporve compatibility with reasoning template And/Or Implement API response field "reasoning_content" like R1 API/llama.cpp #309

@Originalimoc

Description

@Originalimoc

Problem

The chat templates of R1/QwQ auto append a tag in front of generation to force thinking but this breaks some UI, eg. ggml-org/llama.cpp#11861

Solution

Detect the thinking template and return "" in advance of generated content to client.
For reference:
ggml-org/llama.cpp#11607
Solve #294 #299 too.

Alternatives

Hmm.. None?

Acknowledgements

  • I have looked for similar requests before submitting this one.
  • I understand that the developers have lives and my issue will be answered when possible.
  • I understand the developers of this program are human, and I will make my requests politely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions