Skip to content

How can I add a template for Assistant to the user's request in ChatAsync() with History? #1204

Open
@aropb

Description

@aropb

Description

await foreach (string response in session.ChatAsync(new ChatHistory.Message(AuthorRole.User, input),
inferenceParams,
cancellationTokenSource.Token))

After the user's request, I want to add:

role: assistant, message: think\n\nthink\n\n

This is necessary to explicitly disable reflection for Qwen3. Because the /think or /no_think directives don't work stably.

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