Method RegenerateResponseAsync
- Namespace
- LMKit.TextGeneration
- Assembly
- LM-Kit.NET.dll
RegenerateResponseAsync(CancellationToken)
Asynchronously regenerate a response to the most recent user message.
The original answer is not deleted from history; it is replaced on the same turn with the new one.
public Task<TextGenerationResult> RegenerateResponseAsync(CancellationToken cancellationToken = default)Parameters
- cancellationTokenCancellationToken
- Optional cancellation token. 
Returns
- Task<TextGenerationResult>
- A task that resolves to TextGenerationResult. 
Exceptions
- InvalidOperationException
- If there is no assistant response to regenerate. 
- OperationCanceledException
- If the operation is cancelled.