Method QueryPartitionsAsync
QueryPartitionsAsync(string, IEnumerable<TextPartitionSimilarity>, IConversation, CancellationToken)
Asynchronously generates a text result by querying the specified text partitions and initiating a conversation within the provided chat context.
public Task<TextGenerationResult> QueryPartitionsAsync(string query, IEnumerable<RagEngine.TextPartitionSimilarity> partitionSimilarities, IConversation chat, CancellationToken cancellationToken = default)
Parameters
query
stringThe query string used as the basis for generating the text result.
partitionSimilarities
IEnumerable<RagEngine.TextPartitionSimilarity>A collection of RagEngine.TextPartitionSimilarity instances representing the similarities found within text partitions, typically returned by the FindMatchingPartitions(string, int, float, bool, CancellationToken) method.
chat
IConversationAn instance of IConversation representing the chat context in which the query will be submitted and processed.
cancellationToken
CancellationTokenA CancellationToken that can be used to cancel the operation if necessary.
Returns
- Task<TextGenerationResult>
A task representing the asynchronous operation, which upon completion returns a TextGenerationResult object containing the generated text result based on the query and specified partitions.