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
    • enabled

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

      public BUILDER clearModelName()
      Clear existing value of modelName.
      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 baseUrl.
      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 maxRetries.
      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 apiKey.
      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 logger.
      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 logResponses.
      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 logRequests.
      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 timeout.
      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 proxy.
      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:
    • proxyDiscoverServices

      public BUILDER proxyDiscoverServices(boolean proxyDiscoverServices)
      Service discovery flag for proxy(). If set to true, services will be discovered from Java service loader, or Helidon ServiceRegistry.
      Parameters:
      proxyDiscoverServices - whether to enable automatic service discovery
      Returns:
      updated builder instance
      See Also:
    • serviceRegistry

      public BUILDER serviceRegistry(ServiceRegistry serviceRegistry)
      Service registry used to discover providers and services. Provide an explicit registry instance to use.

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

      Parameters:
      serviceRegistry - service registry to use
      Returns:
      updated builder instance
      See Also:
    • enabled

      public boolean enabled()
      If set to false, CohereScoringModel will not be available even if configured.
      Returns:
      whether CohereScoringModel is enabled, defaults to true
    • modelName

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

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

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

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

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

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

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

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

      public Optional<Proxy> proxy()
      Proxy to use.
      Returns:
      an Optional containing HTTP proxy to use
    • proxyDiscoverServices

      public boolean proxyDiscoverServices()
      Service discovery flag for proxy(). If set to true, services will be discovered from Java service loader, or Helidon ServiceRegistry.
      Returns:
      whether to enable automatic service discovery
    • serviceRegistry

      public Optional<ServiceRegistry> serviceRegistry()
      Service registry used to discover providers and services. Provide an explicit registry instance to use.

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

      Returns:
      service registry to use
    • toString

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

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

      protected void validatePrototype()
      Validates required properties.
    • config

      protected Optional<Config> config()
      Configuration used to configure this instance.
      Returns:
      config instance