Table of Contents

Method RegenerateResponse

Namespace
LMKit.TextGeneration
Assembly
LM-Kit.NET.dll

RegenerateResponse(CancellationToken)

Regenerate a fresh response to the most recent user message without altering prior turns.

The previous assistant answer for that user message is replaced by a new one. Use this when you want an alternative phrasing or reasoning path.

public TextGenerationResult RegenerateResponse(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Optional cancellation token.

Returns

TextGenerationResult

A new TextGenerationResult for the last user message.

Exceptions

InvalidOperationException

If there is no assistant response to regenerate.

OperationCanceledException

If the operation is cancelled.