Table of Contents

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 string

Specifies the user's request formulated in natural language.

cancellationToken CancellationToken

Optional. 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.