Class VectorizationStepHandlerBase
- Namespace
 - FoundationaLLM.Vectorization.Handlers
 
- Assembly
 - FoundationaLLM.Vectorization.Engine.dll
 
Implements basic vectorization step handler functionality.
public class VectorizationStepHandlerBase : IVectorizationStepHandler
  - Inheritance
 - 
      
      VectorizationStepHandlerBase
 
- Implements
 
- Derived
 
- Inherited Members
 
- Extension Methods
 
Constructors
VectorizationStepHandlerBase(string, string, Dictionary<string, string>, IConfigurationSection?, IVectorizationStateService, IServiceProvider, ILoggerFactory)
Implements basic vectorization step handler functionality.
public VectorizationStepHandlerBase(string stepId, string messageId, Dictionary<string, string> parameters, IConfigurationSection? stepsConfiguration, IVectorizationStateService stateService, IServiceProvider serviceProvider, ILoggerFactory loggerFactory)
  Parameters
stepIdstringThe identifier of the vectorization step.
messageIdstringThe identifier of underlying message retrieved from the request source.
parametersDictionary<string, string>The dictionary of named parameters used to configure the handler.
stepsConfigurationIConfigurationSectionThe app configuration section containing the configuration for vectorization pipeline steps.
stateServiceIVectorizationStateServiceThe IVectorizationStateService that manages vectorization state.
serviceProviderIServiceProviderThe IServiceProvider implemented by the dependency injection container.
loggerFactoryILoggerFactoryThe logger factory used to create loggers for logging.
Fields
_logger
The logger used for logging.
protected readonly ILogger<VectorizationStepHandlerBase> _logger
  Field Value
_messageId
The identifier of underlying message retrieved from the request source.
protected readonly string _messageId
  Field Value
_parameters
The dictionary of named parameters used to configure the handler.
protected readonly Dictionary<string, string> _parameters
  Field Value
_serviceProvider
The service provider implemented by the dependency injection container.
protected readonly IServiceProvider _serviceProvider
  Field Value
_stateService
The vectorization state service.
protected readonly IVectorizationStateService _stateService
  Field Value
_stepId
The identifier of the vectorization step.
protected readonly string _stepId
  Field Value
_stepsConfiguration
The app configuration section containing the configuration for vectorization pipeline steps.
protected readonly IConfigurationSection? _stepsConfiguration
  Field Value
Properties
StepId
The identifier of the vectorization pipeline step.
public string StepId { get; }
  Property Value
Methods
Invoke(VectorizationRequest, VectorizationState, UnifiedUserIdentity, CancellationToken)
Invokes the handler.
public Task<bool> Invoke(VectorizationRequest request, VectorizationState state, UnifiedUserIdentity userIdentity, CancellationToken cancellationToken)
  Parameters
requestVectorizationRequestThe VectorizationRequest for which the step should be handled.
stateVectorizationStateThe VectorizationState holding the state associated with the vectorization request.
userIdentityUnifiedUserIdentityThe UnifiedUserIdentity providing information about the calling user identity.
cancellationTokenCancellationTokenThe CancellationToken to monitor for cancellation requests.
Returns
ProcessRequest(VectorizationRequest, VectorizationState, IConfigurationSection?, UnifiedUserIdentity, CancellationToken)
Processes a vectorization request. The vectorization state will be updated with the result(s) of the processing.
protected virtual Task<bool> ProcessRequest(VectorizationRequest request, VectorizationState state, IConfigurationSection? stepConfiguration, UnifiedUserIdentity userIdentity, CancellationToken cancellationToken)
  Parameters
requestVectorizationRequestThe VectorizationRequest to be processed.
stateVectorizationStateThe VectorizationState associated with the vectorization request.
stepConfigurationIConfigurationSectionThe IConfigurationSection providing the configuration required by the step.
userIdentityUnifiedUserIdentityThe UnifiedUserIdentity providing information about the calling user identity.
cancellationTokenCancellationTokenThe CancellationToken that signals stopping the processing.