Table of Contents

Method RegenerateResponseAsync

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

RegenerateResponseAsync(CancellationToken)

Asynchronously regenerates the last response using the same context.

public Task<DocumentQueryResult> RegenerateResponseAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Token to cancel the operation.

Returns

Task<DocumentQueryResult>

A task containing a DocumentQueryResult with the regenerated response.

Remarks

Useful for obtaining an alternative phrasing or exploring different reasoning paths when using non-deterministic sampling modes.

Exceptions

InvalidOperationException

Thrown if no documents have been loaded or no previous response exists.

ObjectDisposedException

Thrown if this instance has been disposed.