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

java.lang.Object
io.helidon.integrations.langchain4j.providers.cohere.CohereScoringModelConfig.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:
CohereScoringModelConfig.Builder
Enclosing interface:
CohereScoringModelConfig

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

    • BuilderBase

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

    • from

      public BUILDER from(CohereScoringModelConfig 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(CohereScoringModelConfig.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 CohereScoringModelConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends CohereScoringModelConfig>
      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 CohereScoringModelConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends CohereScoringModelConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • serviceRegistry

      public BUILDER serviceRegistry(ServiceRegistry registry)
      Provide an explicit registry instance to use.

      If not configured, the GlobalServiceRegistry would be used to discover services.

      Parameters:
      registry - service registry instance
      Returns:
      updated builder instance
    • enabled

      public BUILDER enabled(boolean enabled)
      If set to false (default), CohereScoringModel will not be available even if configured.
      Parameters:
      enabled - whether CohereScoringModel 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 CohereScoringModel.CohereScoringModelBuilder.modelName(java.lang.String)
      Parameters:
      modelName - String 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 CohereScoringModel.CohereScoringModelBuilder.baseUrl(java.lang.String)
      Parameters:
      baseUrl - String property
      Returns:
      updated builder instance
      See Also:
    • clearMaxRetries

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

      public BUILDER maxRetries(int maxRetries)
      Generated from CohereScoringModel.CohereScoringModelBuilder.maxRetries(java.lang.Integer)
      Parameters:
      maxRetries - Integer 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 CohereScoringModel.CohereScoringModelBuilder.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 CohereScoringModel.CohereScoringModelBuilder.logger(org.slf4j.Logger)
      Parameters:
      logger - Logger 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 CohereScoringModel.CohereScoringModelBuilder.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 CohereScoringModel.CohereScoringModelBuilder.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 CohereScoringModel.CohereScoringModelBuilder.timeout(java.time.Duration)
      Parameters:
      timeout - Duration property
      Returns:
      updated builder instance
      See Also:
    • clearProxy

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

      public BUILDER proxy(Proxy proxy)
      Proxy to use.
      Parameters:
      proxy - an Optional containing HTTP proxy to use
      Returns:
      updated builder instance
      See Also:
    • enabled

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

      public Optional<String> modelName()
      Generated from CohereScoringModel.CohereScoringModelBuilder.modelName(java.lang.String)
      Returns:
      the model name
    • baseUrl

      public Optional<String> baseUrl()
      Generated from CohereScoringModel.CohereScoringModelBuilder.baseUrl(java.lang.String)
      Returns:
      the base url
    • maxRetries

      public Optional<Integer> maxRetries()
      Generated from CohereScoringModel.CohereScoringModelBuilder.maxRetries(java.lang.Integer)
      Returns:
      the max retries
    • apiKey

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

      public Optional<org.slf4j.Logger> logger()
      Generated from CohereScoringModel.CohereScoringModelBuilder.logger(org.slf4j.Logger)
      Returns:
      the logger
    • logResponses

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

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

      public Optional<Duration> timeout()
      Generated from CohereScoringModel.CohereScoringModelBuilder.timeout(java.time.Duration)
      Returns:
      the timeout
    • proxy

      public Optional<Proxy> proxy()
      Proxy to use.
      Returns:
      the proxy
    • 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.