Method ContinueLastAssistantResponseAsync
- Namespace
- LMKit.TextGeneration
- Assembly
- LM-Kit.NET.dll
ContinueLastAssistantResponseAsync(CancellationToken)
Asynchronously continue the last assistant message without any new user input.
Useful to let the model finish or expand an answer that was intentionally constrained by MaximumCompletionTokens. Not supported when Grammar is set.
public Task<TextGenerationResult> ContinueLastAssistantResponseAsync(CancellationToken cancellationToken = default)Parameters
- cancellationTokenCancellationToken
- Optional cancellation token. 
Returns
- Task<TextGenerationResult>
- A task that resolves to TextGenerationResult with additional content. 
Exceptions
- InvalidOperationException
- If there is no assistant message to continue or if Grammar is set. 
- OperationCanceledException
- If the operation is cancelled.