Class GatewayTextEmbeddingService
- Namespace
 - FoundationaLLM.Vectorization.Services.Text
 
- Assembly
 - FoundationaLLM.Vectorization.Engine.dll
 
Generates text embeddings by routing requests through the FoundationaLLM Gateway API.
public class GatewayTextEmbeddingService : ITextEmbeddingService
  - Inheritance
 - 
      
      GatewayTextEmbeddingService
 
- Implements
 
- Inherited Members
 
- Extension Methods
 
Constructors
GatewayTextEmbeddingService(IOptions<InstanceSettings>, IHttpClientFactoryService, ILoggerFactory)
Generates text embeddings by routing requests through the FoundationaLLM Gateway API.
public GatewayTextEmbeddingService(IOptions<InstanceSettings> instanceOptions, IHttpClientFactoryService httpClientFactoryService, ILoggerFactory loggerFactory)
  Parameters
instanceOptionsIOptions<InstanceSettings>The options providing the InstanceSettings with instance settings.
httpClientFactoryServiceIHttpClientFactoryServiceThe HTTP Client Factory service.
loggerFactoryILoggerFactoryThe logger factory used to create loggers for logging.
Methods
GetEmbeddingsAsync(IList<TextChunk>, string, int, bool)
Initializes the text embedding operation. Depending on the implementation, this can be an atomic operation or a long-running one.
public Task<TextOperationResult> GetEmbeddingsAsync(IList<TextChunk> textChunks, string modelName, int embeddingDimensions, bool Prioritized)
  Parameters
textChunksIList<TextChunk>The list of text chunks which need to be embedded.
modelNamestringembeddingDimensionsintThe number of dimensions for the embedding model.
Prioritizedbool
Returns
- Task<TextOperationResult>
 A TextOperationResult object containing the result of the text embedding operation.
GetEmbeddingsAsync(string)
Retrieves the result of a long-running text embedding operation.
public Task<TextOperationResult> GetEmbeddingsAsync(string operationId)
  Parameters
operationIdstringThe unique identifier of the long-running operation.
Returns
- Task<TextOperationResult>
 A TextOperationResult object containing the result of the text embedding operation.