Table of Contents

Class TextEmbeddingServiceFactory

Namespace
FoundationaLLM.Vectorization.Services.Text
Assembly
FoundationaLLM.Vectorization.Engine.dll

Creates text splitter service instances.

public class TextEmbeddingServiceFactory : IVectorizationServiceFactory<ITextEmbeddingService>
Inheritance
TextEmbeddingServiceFactory
Implements
Inherited Members
Extension Methods

Constructors

TextEmbeddingServiceFactory(IEnumerable<IResourceProviderService>, IConfiguration, IServiceProvider, ILoggerFactory)

Creates text splitter service instances.

public TextEmbeddingServiceFactory(IEnumerable<IResourceProviderService> resourceProviderServices, IConfiguration configuration, IServiceProvider serviceProvider, ILoggerFactory loggerFactory)

Parameters

resourceProviderServices IEnumerable<IResourceProviderService>

The collection of registered resource providers.

configuration IConfiguration

The global configuration provider.

serviceProvider IServiceProvider

The IServiceProvider providing dependency injection services.

loggerFactory ILoggerFactory

The logger factory used to create loggers.

Methods

GetService(string, UnifiedUserIdentity)

Retrieves a service instance of type T specified by name.

public Task<ITextEmbeddingService> GetService(string serviceName, UnifiedUserIdentity userIdentity)

Parameters

serviceName string

The name of the service instance to create.

userIdentity UnifiedUserIdentity

The UnifiedUserIdentity providing information about the calling user identity.

Returns

Task<ITextEmbeddingService>

The service instance created by name.

GetServiceWithResource(string, UnifiedUserIdentity)

Retrieves a service instance of type T specified by name and its associated resource object (if any).

public Task<(ITextEmbeddingService Service, ResourceBase Resource)> GetServiceWithResource(string serviceName, UnifiedUserIdentity userIdentity)

Parameters

serviceName string

The name of the service instance to create.

userIdentity UnifiedUserIdentity

The UnifiedUserIdentity providing information about the calling user identity.

Returns

Task<(ITextEmbeddingService Service, ResourceBase Resource)>

The service instance and its associated resource object (if any).