Class CohereEmbeddingModelConfig.BuilderBase<BUILDER extends CohereEmbeddingModelConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends CohereEmbeddingModelConfig>

java.lang.Object
io.helidon.integrations.langchain4j.providers.cohere.CohereEmbeddingModelConfig.BuilderBase<BUILDER,PROTOTYPE>
Type Parameters:
BUILDER - type of the builder extending this abstract builder
PROTOTYPE - type of the prototype interface that would be built by Prototype.Builder.buildPrototype()
All Implemented Interfaces:
Prototype.Builder<BUILDER,PROTOTYPE>, ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>, ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Direct Known Subclasses:
CohereEmbeddingModelConfig.Builder
Enclosing interface:
CohereEmbeddingModelConfig

public abstract static class CohereEmbeddingModelConfig.BuilderBase<BUILDER extends CohereEmbeddingModelConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends CohereEmbeddingModelConfig> extends Object implements ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for CohereEmbeddingModelConfig.
  • Constructor Details

    • BuilderBase

      protected BuilderBase()
      Protected to support extensibility.
  • Method Details

    • from

      public BUILDER from(CohereEmbeddingModelConfig prototype)
      Update this builder from an existing prototype instance. This method disables automatic service discovery.
      Parameters:
      prototype - existing prototype to update this builder from
      Returns:
      updated builder instance
    • from

      public BUILDER from(CohereEmbeddingModelConfig.BuilderBase<?,?> builder)
      Update this builder from an existing prototype builder instance.
      Parameters:
      builder - existing builder prototype to update this builder from
      Returns:
      updated builder instance
    • config

      @Deprecated public BUILDER config(Config config)
      Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.
      Specified by:
      config in interface ConfigBuilderSupport.ConfiguredBuilder<BUILDER extends CohereEmbeddingModelConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends CohereEmbeddingModelConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • config

      public BUILDER config(Config config)
      Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.
      Specified by:
      config in interface ConfigBuilderSupport.ConfiguredBuilder<BUILDER extends CohereEmbeddingModelConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends CohereEmbeddingModelConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • enabled

      public BUILDER enabled(boolean enabled)
      If set to false (default), CohereEmbeddingModel will not be available even if configured.
      Parameters:
      enabled - whether CohereEmbeddingModel is enabled, defaults to false
      Returns:
      updated builder instance
      See Also:
    • clearModelName

      public BUILDER clearModelName()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • modelName

      public BUILDER modelName(String modelName)
      Generated from CohereEmbeddingModel.CohereEmbeddingModelBuilder.modelName(java.lang.String)
      Parameters:
      modelName - String property
      Returns:
      updated builder instance
      See Also:
    • clearMaxSegmentsPerBatch

      public BUILDER clearMaxSegmentsPerBatch()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • maxSegmentsPerBatch

      public BUILDER maxSegmentsPerBatch(int maxSegmentsPerBatch)
      Generated from CohereEmbeddingModel.CohereEmbeddingModelBuilder.maxSegmentsPerBatch(java.lang.Integer)
      Parameters:
      maxSegmentsPerBatch - Integer property
      Returns:
      updated builder instance
      See Also:
    • clearBaseUrl

      public BUILDER clearBaseUrl()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • baseUrl

      public BUILDER baseUrl(String baseUrl)
      Generated from CohereEmbeddingModel.CohereEmbeddingModelBuilder.baseUrl(java.lang.String)
      Parameters:
      baseUrl - String property
      Returns:
      updated builder instance
      See Also:
    • clearApiKey

      public BUILDER clearApiKey()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • apiKey

      public BUILDER apiKey(String apiKey)
      Generated from CohereEmbeddingModel.CohereEmbeddingModelBuilder.apiKey(java.lang.String)
      Parameters:
      apiKey - String property
      Returns:
      updated builder instance
      See Also:
    • clearLogger

      public BUILDER clearLogger()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • logger

      public BUILDER logger(org.slf4j.Logger logger)
      Generated from CohereEmbeddingModel.CohereEmbeddingModelBuilder.logger(org.slf4j.Logger)
      Parameters:
      logger - Logger property
      Returns:
      updated builder instance
      See Also:
    • clearInputType

      public BUILDER clearInputType()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • inputType

      public BUILDER inputType(String inputType)
      Generated from CohereEmbeddingModel.CohereEmbeddingModelBuilder.inputType(java.lang.String)
      Parameters:
      inputType - String property
      Returns:
      updated builder instance
      See Also:
    • clearLogResponses

      public BUILDER clearLogResponses()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • logResponses

      public BUILDER logResponses(boolean logResponses)
      Generated from CohereEmbeddingModel.CohereEmbeddingModelBuilder.logResponses(java.lang.Boolean)
      Parameters:
      logResponses - Boolean property
      Returns:
      updated builder instance
      See Also:
    • clearLogRequests

      public BUILDER clearLogRequests()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • logRequests

      public BUILDER logRequests(boolean logRequests)
      Generated from CohereEmbeddingModel.CohereEmbeddingModelBuilder.logRequests(java.lang.Boolean)
      Parameters:
      logRequests - Boolean property
      Returns:
      updated builder instance
      See Also:
    • clearTimeout

      public BUILDER clearTimeout()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • timeout

      public BUILDER timeout(Duration timeout)
      Generated from CohereEmbeddingModel.CohereEmbeddingModelBuilder.timeout(java.time.Duration)
      Parameters:
      timeout - Duration property
      Returns:
      updated builder instance
      See Also:
    • enabled

      public boolean enabled()
      If set to false (default), CohereEmbeddingModel will not be available even if configured.
      Returns:
      the enabled
    • modelName

      public Optional<String> modelName()
      Generated from CohereEmbeddingModel.CohereEmbeddingModelBuilder.modelName(java.lang.String)
      Returns:
      the model name
    • maxSegmentsPerBatch

      public Optional<Integer> maxSegmentsPerBatch()
      Generated from CohereEmbeddingModel.CohereEmbeddingModelBuilder.maxSegmentsPerBatch(java.lang.Integer)
      Returns:
      the max segments per batch
    • baseUrl

      public Optional<String> baseUrl()
      Generated from CohereEmbeddingModel.CohereEmbeddingModelBuilder.baseUrl(java.lang.String)
      Returns:
      the base url
    • apiKey

      public Optional<String> apiKey()
      Generated from CohereEmbeddingModel.CohereEmbeddingModelBuilder.apiKey(java.lang.String)
      Returns:
      the api key
    • logger

      public Optional<org.slf4j.Logger> logger()
      Generated from CohereEmbeddingModel.CohereEmbeddingModelBuilder.logger(org.slf4j.Logger)
      Returns:
      the logger
    • inputType

      public Optional<String> inputType()
      Generated from CohereEmbeddingModel.CohereEmbeddingModelBuilder.inputType(java.lang.String)
      Returns:
      the input type
    • logResponses

      public Optional<Boolean> logResponses()
      Generated from CohereEmbeddingModel.CohereEmbeddingModelBuilder.logResponses(java.lang.Boolean)
      Returns:
      the log responses
    • logRequests

      public Optional<Boolean> logRequests()
      Generated from CohereEmbeddingModel.CohereEmbeddingModelBuilder.logRequests(java.lang.Boolean)
      Returns:
      the log requests
    • timeout

      public Optional<Duration> timeout()
      Generated from CohereEmbeddingModel.CohereEmbeddingModelBuilder.timeout(java.time.Duration)
      Returns:
      the timeout
    • config

      public Optional<Config> config()
      If this instance was configured, this would be the config instance used.
      Returns:
      config node used to configure this builder, or empty if not configured
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • preBuildPrototype

      protected void preBuildPrototype()
      Handles providers and decorators.
    • validatePrototype

      protected void validatePrototype()
      Validates required properties.