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

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

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

    • BuilderBase

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

    • from

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

      public BUILDER clearChatModel()
      Clear existing value of chatModel.
      Returns:
      updated builder instance
      See Also:
    • chatModel

      public BUILDER chatModel(String chatModel)
      ChatModel option.
      Parameters:
      chatModel - the chatModel option
      Returns:
      updated builder instance
      See Also:
    • chatModel

      public Optional<String> chatModel()
      ChatModel option.
      Returns:
      the chatModel option
    • 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