Method SubmitAsync
- Namespace
- LMKit.TextGeneration
- Assembly
- LM-Kit.NET.dll
SubmitAsync(string, CancellationToken)
Prompts the model with an arbitrary request.
public Task<TextGenerationResult> SubmitAsync(string prompt, CancellationToken cancellationToken = default)
Parameters
prompt
stringSpecifies the user's request formulated in natural language.
cancellationToken
CancellationTokenOptional. A CancellationToken for handling cancellation requests.
Returns
- Task<TextGenerationResult>
A TextGenerationResult object holding the result of the text generation operation.
Exceptions
- ArgumentNullException
Thrown when the provided
prompt
argument is null or empty.- OperationCanceledException
Thrown when the operation is cancelled based on the CancellationToken.