Class EmbeddingOperationContext
- Namespace
- FoundationaLLM.Gateway.Models
- Assembly
- FoundationaLLM.Gateway.dll
Maintains the context for an embedding operation.
public class EmbeddingOperationContext
- Inheritance
-
EmbeddingOperationContext
- Inherited Members
- Extension Methods
Properties
InputTextChunks
The list of TextChunk objects which provide the input to the embedding operation.
public required IList<TextChunk> InputTextChunks { get; set; }
Property Value
Prioritized
Indicates whether the requests associated with the context should be prioritized. Example: Synchronous vectorization and user prompt embedding for completions.
public bool Prioritized { get; set; }
Property Value
Result
The TextEmbeddingResult holding the result of the embedding operation.
public required TextEmbeddingResult Result { get; set; }
Property Value
Methods
SetComplete()
Marks the embedding operation as complete.
public void SetComplete()
SetEmbeddings(IList<TextChunk>)
Sets the embeddings for a specified set of position. If all positions have non-null embeddings, marks the operation as complete.
public void SetEmbeddings(IList<TextChunk> textChunks)
Parameters
textChunks
IList<TextChunk>A list of TextChunk objects containing positions and their associated embeddings.
SetError(string)
Sets a specified error message on the context of the embedding operation.
public void SetError(string errorMessage)
Parameters
errorMessage
stringThe error message to be set.