Table of Contents

Method SubmitAsync

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

SubmitAsync(string, CancellationToken)

Asynchronously submits a question and returns a response based on the loaded documents.

public Task<DocumentQueryResult> SubmitAsync(string question, CancellationToken cancellationToken = default)

Parameters

question string

The question to ask.

cancellationToken CancellationToken

Token to cancel the operation.

Returns

Task<DocumentQueryResult>

A task containing a DocumentQueryResult with the generated response and references to source passages used.

Exceptions

InvalidOperationException

Thrown if no documents have been loaded.

ArgumentNullException

Thrown if question is null or empty.

ObjectDisposedException

Thrown if this instance has been disposed.