Table of Contents

Class RetrievalCompletedEventArgs

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

Provides data for the RetrievalCompleted event, fired after partition retrieval completes and before response generation begins.

public sealed class RetrievalCompletedEventArgs : EventArgs
Inheritance
RetrievalCompletedEventArgs
Inherited Members

Examples

ragChat.RetrievalCompleted += (sender, e) =>
{
    Console.WriteLine($"Query: {e.Query}");
    Console.WriteLine($"Retrieved {e.RetrievedPartitions.Count} of {e.RequestedCount} requested partitions");
    Console.WriteLine($"Retrieval took {e.Elapsed.TotalMilliseconds:F0} ms");
};

Constructors

RetrievalCompletedEventArgs(string, IReadOnlyList<PartitionSimilarity>, int, TimeSpan)

Initializes a new instance of the RetrievalCompletedEventArgs class.

Properties

Elapsed

Gets the elapsed time for the retrieval operation.

Query

Gets the query that was used for retrieval.

RequestedCount

Gets the maximum number of partitions that were requested.

RetrievedPartitions

Gets the partitions retrieved from the knowledge base.

Share