Method RegenerateResponse
- Namespace
- LMKit.TextGeneration
- Assembly
- LM-Kit.NET.dll
RegenerateResponse(CancellationToken)
Regenerates a response to the most recent user inquiry without altering the existing chat history.
public TextGenerationResult RegenerateResponse(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenOptional. Monitors for cancellation requests.
Returns
- TextGenerationResult
A TextGenerationResult containing the newly generated response.
Exceptions
- InvalidOperationException
Thrown if there is no assistant response in the chat history to regenerate.
- OperationCanceledException
Thrown if the operation is canceled.