Table of Contents

Method Submit

Namespace
LMKit.TextGeneration
Assembly
LM-Kit.NET.dll

Submit(string, CancellationToken)

Submits a request to the model for text generation.

public TextGenerationResult Submit(string prompt, CancellationToken cancellationToken = default)

Parameters

prompt string

The user's request in natural language.

cancellationToken CancellationToken

Optional. A CancellationToken to handle cancellation requests.

Returns

TextGenerationResult

A TextGenerationResult object containing the generated text result.

Exceptions

OperationCanceledException

Thrown when the operation is cancelled based on the CancellationToken.

Submit(Prompt, CancellationToken)

Prompts the model with a structured request encapsulated in a Prompt object.

public TextGenerationResult Submit(Prompt prompt, CancellationToken cancellationToken = default)

Parameters

prompt Prompt

An instance of Prompt representing the user's request, potentially including text and attachments.

cancellationToken CancellationToken

Optional. A CancellationToken for handling cancellation requests.

Returns

TextGenerationResult

A TextGenerationResult object holding the result of the text generation operation.

Exceptions

ArgumentNullException

Thrown when the provided prompt argument is null.

OperationCanceledException

Thrown when the operation is cancelled based on the CancellationToken.