Class RequestSourcesBuilder
- Assembly
- FoundationaLLM.Vectorization.Engine.dll
Implements a builder for a dictionary of request sources (hashed by the identifier of the request source).
public class RequestSourcesBuilder
- Inheritance
-
RequestSourcesBuilder
- Inherited Members
- Extension Methods
Constructors
RequestSourcesBuilder()
Constructs a new instance of the builder.
public RequestSourcesBuilder()
Methods
Build()
Builds the dictionary of request source.
public Dictionary<string, IRequestSourceService> Build()
Returns
- Dictionary<string, IRequestSourceService>
The dictionary of IRequestSourceService instances, hashed by the identifier of the request source.
Exceptions
- VectorizationException
Thrown if the state of the builder was not properly initialized.
WithLoggerFactory(ILoggerFactory)
Specifies the logger factory used to create loggers for the request sources.
public RequestSourcesBuilder WithLoggerFactory(ILoggerFactory loggerFactory)
Parameters
loggerFactory
ILoggerFactoryThe ILoggerFactory used to create loggers.
Returns
- RequestSourcesBuilder
The updated instance of the builder.
WithQueuesConfiguration(IConfigurationSection)
Specifies the configuration section containing settings for the queues used by the request sources.
public RequestSourcesBuilder WithQueuesConfiguration(IConfigurationSection queuesConfiguration)
Parameters
queuesConfiguration
IConfigurationSectionThe IConfigurationSection object providing access to the settings.
Returns
- RequestSourcesBuilder
The updated instance of the builder.
WithQueuing(VectorizationQueuing)
Specifies the type of queuing used by the request sources.
public RequestSourcesBuilder WithQueuing(VectorizationQueuing queuing)
Parameters
queuing
VectorizationQueuingThe VectorizationQueuing value defining the type of queuing.
Returns
- RequestSourcesBuilder
The updated instance of the builder.
WithSettings(List<RequestSourceServiceSettings>?)
Specifies the settings for each IRequestSourceService instance to be built.
public RequestSourcesBuilder WithSettings(List<RequestSourceServiceSettings>? settings)
Parameters
settings
List<RequestSourceServiceSettings>The list of RequestSourceServiceSettings objects providing the settings for the request sources.
Returns
- RequestSourcesBuilder
The updated instance of the builder.