InterfaceIContextRetriever
Interface
Provides methods for retrieving relevant context from embeddings and managing text fragments.
Definition
Namespace:Telerik.Documents.AI.Core
Assembly:Telerik.Documents.AI.Core.dll
Syntax:
cs-api-definition
public interface IContextRetriever
Derived Classes:
Methods
GetContextAsync(string)
Gets the text representation of the relevant embeddings for the provided question.
SetContextAsync(string, int)
Asynchronously splits the specified text into fragments based on the provided embedding token size.
Declaration
cs-api-definition
Task SetContextAsync(string text, int embeddingTokenSize)
Parameters
text
The text to be divided into fragments. Cannot be null.
embeddingTokenSize
The maximum number of tokens allowed in each fragment. Must be a positive integer.
Returns
A task that represents the asynchronous operation of fragmenting the text.