Class
CompleteContextQuestionProcessor

Single-shot Q&A that sends the entire document text to the model; use when the document fits within the model’s input token limit.

Definition

Namespace:Telerik.Windows.Documents.AIConnector

Assembly:Telerik.Windows.Documents.AIConnector.dll

Syntax:

cs-api-definition
public sealed class CompleteContextQuestionProcessor : AIProcessorBase, IDisposable

Inheritance: objectAIProcessorBaseCompleteContextQuestionProcessor

Implements: IDisposable

Inherited Members AIProcessorBase.Dispose()

Constructors

CompleteContextQuestionProcessor(IChatClient, CompleteContextProcessorSettings)

Initializes a new instance of the CompleteContextQuestionProcessor class.

Declaration

cs-api-definition
public CompleteContextQuestionProcessor(IChatClient chatClient, CompleteContextProcessorSettings settings)

Parameters

chatClient

IChatClient

The chat client to be used for communication with the AI model.

settings

CompleteContextProcessorSettings

The settings that configure full-context Q&A behavior.

Properties

Settings

Gets the settings that configure full-context Q&A behavior, including token limits and encoding.

Declaration

cs-api-definition
public CompleteContextProcessorSettings Settings { get; }

Property Value

CompleteContextProcessorSettings

Methods

AnswerQuestion(SimpleTextDocument, string)

Generates an answer by prompting the model with the entire document text and the question, up to the configured input token limit.

Declaration

cs-api-definition
public Task<string> AnswerQuestion(SimpleTextDocument document, string question)

Parameters

document

SimpleTextDocument

The document.

question

string

The question.

Returns

Task<string>

The answer to the question.