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

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

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

    • BuilderBase

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

    • from

      public BUILDER from(OracleEmbeddingStoreConfig 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(OracleEmbeddingStoreConfig.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 OracleEmbeddingStoreConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends OracleEmbeddingStoreConfig>
      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 OracleEmbeddingStoreConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends OracleEmbeddingStoreConfig>
      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, OracleEmbeddingStore will not be available even if configured.
      Parameters:
      enabled - whether OracleEmbeddingStore is enabled, defaults to true
      Returns:
      updated builder instance
      See Also:
    • clearExactSearch

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

      public BUILDER exactSearch(boolean exactSearch)
      Generated from OracleEmbeddingStore.Builder.exactSearch(boolean)
      Parameters:
      exactSearch - boolean property
      Returns:
      updated builder instance
      See Also:
    • clearEmbeddingTable

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

      public BUILDER embeddingTable(EmbeddingTableConfig embeddingTable)
      Configures a table used to store embeddings, text, and metadata.
      Parameters:
      embeddingTable - an Optional containing the table used to store embeddings if set; otherwise, an empty Optional.
      Returns:
      updated builder instance
      See Also:
    • embeddingTable

      public BUILDER embeddingTable(Consumer<EmbeddingTableConfig.Builder> consumer)
      Configures a table used to store embeddings, text, and metadata.
      Parameters:
      consumer - consumer of builder of an Optional containing the table used to store embeddings if set; otherwise, an empty Optional.
      Returns:
      updated builder instance
      See Also:
    • embeddingTable

      public BUILDER embeddingTable(Supplier<? extends EmbeddingTableConfig> supplier)
      Configures a table used to store embeddings, text, and metadata.
      Parameters:
      supplier - supplier of an Optional containing the table used to store embeddings if set; otherwise, an empty Optional.
      Returns:
      updated builder instance
      See Also:
    • clearJsonIndex

      public BUILDER clearJsonIndex()
      Clear all jsonIndex.
      Returns:
      updated builder instance
      See Also:
    • jsonIndex

      public BUILDER jsonIndex(List<? extends JsonIndexConfig> jsonIndex)
      JSONIndex allows configuring a function-based index on one or several keys of the metadata column of the EmbeddingTable. The function used to index a key is the same as the function used for searching on the store.
      Parameters:
      jsonIndex - a list of json indexes
      Returns:
      updated builder instance
      See Also:
    • addJsonIndex

      public BUILDER addJsonIndex(List<? extends JsonIndexConfig> jsonIndex)
      JSONIndex allows configuring a function-based index on one or several keys of the metadata column of the EmbeddingTable. The function used to index a key is the same as the function used for searching on the store.
      Parameters:
      jsonIndex - a list of json indexes
      Returns:
      updated builder instance
      See Also:
    • clearIvfIndex

      public BUILDER clearIvfIndex()
      Clear all ivfIndex.
      Returns:
      updated builder instance
      See Also:
    • ivfIndex

      public BUILDER ivfIndex(List<? extends IvfIndexConfig> ivfIndex)
      IVFIndex allows configuring an Inverted File Flat (IVF) index on the embedding column of the EmbeddingTable.
      Parameters:
      ivfIndex - a list of ivf indexes
      Returns:
      updated builder instance
      See Also:
    • addIvfIndex

      public BUILDER addIvfIndex(List<? extends IvfIndexConfig> ivfIndex)
      IVFIndex allows configuring an Inverted File Flat (IVF) index on the embedding column of the EmbeddingTable.
      Parameters:
      ivfIndex - a list of ivf indexes
      Returns:
      updated builder instance
      See Also:
    • clearVectorIndex

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

      public BUILDER vectorIndex(dev.langchain4j.store.embedding.oracle.CreateOption vectorIndex)
      The vector index creation option, which defines behavior when creating the vector index.
      Parameters:
      vectorIndex - an Optional containing the vector index creation option if set; otherwise, an empty Optional
      Returns:
      updated builder instance
      See Also:
    • clearVectorIndexCreateOption

      @Deprecated public BUILDER clearVectorIndexCreateOption()
      Deprecated.
      This option is deprecated, use vectorIndex instead
      Clear existing value of vectorIndexCreateOption.
      Returns:
      updated builder instance
      See Also:
    • vectorIndexCreateOption

      @Deprecated public BUILDER vectorIndexCreateOption(dev.langchain4j.store.embedding.oracle.CreateOption vectorIndexCreateOption)
      Deprecated.
      This option is deprecated, use vectorIndex instead
      Configures the creation of an index on the embedding column of the EmbeddingTable used by the embedding store. Depending on which CreateOption is provided, an index may be created. The default createOption is CreateOption.CREATE_NONE.
      Parameters:
      vectorIndexCreateOption - an Optional containing the vector index creation option if set; otherwise, an empty Optional
      Returns:
      updated builder instance
      See Also:
    • dataSource

      public BUILDER dataSource(DataSource dataSource)
      Configures a data source that connects to an Oracle Database.
      Parameters:
      dataSource - Data source to configure. Not null.
      Returns:
      updated builder instance
      See Also:
    • dataSourceDiscoverServices

      public BUILDER dataSourceDiscoverServices(boolean dataSourceDiscoverServices)
      Service discovery flag for dataSource(). If set to true, services will be discovered from Java service loader, or Helidon ServiceRegistry.
      Parameters:
      dataSourceDiscoverServices - 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, OracleEmbeddingStore will not be available even if configured.
      Returns:
      whether OracleEmbeddingStore is enabled, defaults to true
    • exactSearch

      public Optional<Boolean> exactSearch()
      Generated from OracleEmbeddingStore.Builder.exactSearch(boolean)
      Returns:
      boolean property
    • embeddingTable

      public Optional<EmbeddingTableConfig> embeddingTable()
      Configures a table used to store embeddings, text, and metadata.
      Returns:
      an Optional containing the table used to store embeddings if set; otherwise, an empty Optional.
    • jsonIndex

      public List<JsonIndexConfig> jsonIndex()
      JSONIndex allows configuring a function-based index on one or several keys of the metadata column of the EmbeddingTable. The function used to index a key is the same as the function used for searching on the store.
      Returns:
      a list of json indexes
    • ivfIndex

      public List<IvfIndexConfig> ivfIndex()
      IVFIndex allows configuring an Inverted File Flat (IVF) index on the embedding column of the EmbeddingTable.
      Returns:
      a list of ivf indexes
    • vectorIndex

      public Optional<dev.langchain4j.store.embedding.oracle.CreateOption> vectorIndex()
      The vector index creation option, which defines behavior when creating the vector index.
      Returns:
      an Optional containing the vector index creation option if set; otherwise, an empty Optional
    • vectorIndexCreateOption

      @Deprecated public Optional<dev.langchain4j.store.embedding.oracle.CreateOption> vectorIndexCreateOption()
      Deprecated.
      This option is deprecated, use vectorIndex instead
      Configures the creation of an index on the embedding column of the EmbeddingTable used by the embedding store. Depending on which CreateOption is provided, an index may be created. The default createOption is CreateOption.CREATE_NONE.
      Returns:
      an Optional containing the vector index creation option if set; otherwise, an empty Optional
    • dataSource

      public Optional<DataSource> dataSource()
      Configures a data source that connects to an Oracle Database.
      Returns:
      Data source to configure. Not null.
    • dataSourceDiscoverServices

      public boolean dataSourceDiscoverServices()
      Service discovery flag for dataSource(). 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