Table of Contents

Class VectorizationWorkerBuilder

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

Implements a builder for a vectorization worker.

public class VectorizationWorkerBuilder
Inheritance
VectorizationWorkerBuilder
Inherited Members
Extension Methods

Constructors

VectorizationWorkerBuilder()

Constructs a new instance of the builder.

public VectorizationWorkerBuilder()

Methods

Build()

Builds the vectorization worker.

public VectorizationWorker Build()

Returns

VectorizationWorker

The vectorization worker instance.

Exceptions

VectorizationException

Thrown if the state of the builder was not properly initialized.

WithCancellationToken(CancellationToken)

Specifies the cancellation token used to signal stopping the vectorization worker.

public VectorizationWorkerBuilder WithCancellationToken(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

The CancellationToken used to signal stopping.

Returns

VectorizationWorkerBuilder

The updated instance of the builder.

WithLoggerFactory(ILoggerFactory)

Specifies the logger factory used to create loggers for child objects.

public VectorizationWorkerBuilder WithLoggerFactory(ILoggerFactory loggerFactory)

Parameters

loggerFactory ILoggerFactory

The ILoggerFactory used to create loggers.

Returns

VectorizationWorkerBuilder

The updated instance of the builder.

WithQueuesConfiguration(IConfigurationSection)

Specifies the configuration section containing settings for the queues used by the vectorization worker.

public VectorizationWorkerBuilder WithQueuesConfiguration(IConfigurationSection queuesConfiguration)

Parameters

queuesConfiguration IConfigurationSection

The IConfigurationSection object providing access to the settings.

Returns

VectorizationWorkerBuilder

The updated instance of the builder.

WithServiceProvider(IServiceProvider)

Specifies the dependency injection service provider.

public VectorizationWorkerBuilder WithServiceProvider(IServiceProvider serviceProvider)

Parameters

serviceProvider IServiceProvider

The IServiceProvider implemented by the dependency injection container.

Returns

VectorizationWorkerBuilder

The updated instance of the builder.

WithSettings(VectorizationWorkerSettings)

Specifies the settings used to build the vectorization worker.

public VectorizationWorkerBuilder WithSettings(VectorizationWorkerSettings settings)

Parameters

settings VectorizationWorkerSettings

The VectorizationWorkerSettingsobject providing the settings.

Returns

VectorizationWorkerBuilder

The updated instance of the builder.

WithStateService(IVectorizationStateService)

Specifies the vectorization state service that manages vectorization states.

public VectorizationWorkerBuilder WithStateService(IVectorizationStateService stateService)

Parameters

stateService IVectorizationStateService

The IVectorizationStateService service managing state.

Returns

VectorizationWorkerBuilder

The updated instance of the builder.

WithStepsConfiguration(IConfigurationSection)

Specifies the configuration section containing settings for vectorization pipeline steps.

public VectorizationWorkerBuilder WithStepsConfiguration(IConfigurationSection stepsConfiguration)

Parameters

stepsConfiguration IConfigurationSection

The IConfigurationSection object providing access to the settings.

Returns

VectorizationWorkerBuilder

The updated instance of the builder.