Table of Contents

Class EmbeddingHandler

Namespace
FoundationaLLM.Vectorization.Handlers
Assembly
FoundationaLLM.Vectorization.Engine.dll

Handles the embedding stage of the vectorization pipeline.

public class EmbeddingHandler : VectorizationStepHandlerBase, IVectorizationStepHandler
Inheritance
EmbeddingHandler
Implements
Inherited Members
Extension Methods

Constructors

EmbeddingHandler(string, Dictionary<string, string>, IConfigurationSection?, IVectorizationStateService, IServiceProvider, ILoggerFactory)

Handles the embedding stage of the vectorization pipeline.

public EmbeddingHandler(string messageId, Dictionary<string, string> parameters, IConfigurationSection? stepsConfiguration, IVectorizationStateService stateService, IServiceProvider serviceProvider, ILoggerFactory loggerFactory)

Parameters

messageId string

The identifier of underlying message retrieved from the request source.

parameters Dictionary<string, string>

The dictionary of named parameters used to configure the handler.

stepsConfiguration IConfigurationSection

The app configuration section containing the configuration for vectorization pipeline steps.

stateService IVectorizationStateService

The IVectorizationStateService that manages vectorization state.

serviceProvider IServiceProvider

The IServiceProvider implemented by the dependency injection container.

loggerFactory ILoggerFactory

The logger factory used to create loggers for logging.

Methods

ProcessRequest(VectorizationRequest, VectorizationState, IConfigurationSection?, UnifiedUserIdentity, CancellationToken)

Processes a vectorization request. The vectorization state will be updated with the result(s) of the processing.

protected override Task<bool> ProcessRequest(VectorizationRequest request, VectorizationState state, IConfigurationSection? stepConfiguration, UnifiedUserIdentity userIdentity, CancellationToken cancellationToken)

Parameters

request VectorizationRequest

The VectorizationRequest to be processed.

state VectorizationState

The VectorizationState associated with the vectorization request.

stepConfiguration IConfigurationSection

The IConfigurationSection providing the configuration required by the step.

userIdentity UnifiedUserIdentity

The UnifiedUserIdentity providing information about the calling user identity.

cancellationToken CancellationToken

The CancellationToken that signals stopping the processing.

Returns

Task<bool>