Class EmbeddingTable.Builder

java.lang.Object
dev.langchain4j.store.embedding.oracle.EmbeddingTable.Builder
Enclosing class:
EmbeddingTable

public static class EmbeddingTable.Builder extends Object
A builder that configures and builds an EmbeddingTable.
  • Method Details

    • createOption

      public EmbeddingTable.Builder createOption(CreateOption createOption)
      Configures the option to create (or not create) a table. The default is CreateOption.CREATE_NONE, which means that no attempt is made to create a table.
      Parameters:
      createOption - Option for creating the index. Not null.
      Returns:
      This builder. Not null.
    • name

      public EmbeddingTable.Builder name(String name)
      Configures the name of a table where embeddings are stored and retrieved from. A name must be configured, there is no default name.
      Parameters:
      name - Name of database table. Not null.
      Returns:
      This builder. Not null.
    • idColumn

      public EmbeddingTable.Builder idColumn(String idColumn)
      Configures the name of a column which stores an id. The default name is "id".
      Parameters:
      idColumn - Name of the id column. Not null.
      Returns:
      This builder. Not null.
    • embeddingColumn

      public EmbeddingTable.Builder embeddingColumn(String embeddingColumn)
      Configures the name of a column which stores an embedding. The default name is "embedding".
      Parameters:
      embeddingColumn - Name of the id column. Not null.
      Returns:
      This builder. Not null.
    • textColumn

      public EmbeddingTable.Builder textColumn(String textColumn)
      Configures the name of a column which stores text. The default name is "text".
      Parameters:
      textColumn - Name of the text column. Not null.
      Returns:
      This builder. Not null.
    • metadataColumn

      public EmbeddingTable.Builder metadataColumn(String metadataColumn)
      Configures the name of a column which stores metadata. The default name is "metadata".
      Parameters:
      metadataColumn - Name of the metadata column. Not null.
      Returns:
      This builder. Not null.
    • build

      public EmbeddingTable build()
      Returns a new EmbeddingTable configured by this builder.
      Returns:
      A new EmbeddingTable. Not null.
      Throws:
      IllegalArgumentException - If this builder is missing any required configuration.