Method RegenerateResponseAsync
- Namespace
- LMKit.TextGeneration
- Assembly
- LM-Kit.NET.dll
RegenerateResponseAsync(CancellationToken)
Requests the model to generate a new response to the previous inquiry.
public Task<TextGenerationResult> RegenerateResponseAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenOptional. A CancellationToken for handling cancellation requests.
Returns
- Task<TextGenerationResult>
A TextGenerationResult object holding the result of the text generation operation.
Exceptions
- OperationCanceledException
Thrown when the operation is cancelled based on the CancellationToken.
- InvalidOperationException
Thrown when there is no response in the chat history.