Class EmbeddingTable.Builder
java.lang.Object
dev.langchain4j.store.embedding.oracle.EmbeddingTable.Builder
- Enclosing class:
EmbeddingTable
A builder that configures and builds an
EmbeddingTable
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns a new EmbeddingTable configured by this builder.createOption
(CreateOption createOption) Configures the option to create (or not create) a table.embeddingColumn
(String embeddingColumn) Configures the name of a column which stores an embedding.Configures the name of a column which stores an id.metadataColumn
(String metadataColumn) Configures the name of a column which stores metadata.Configures the name of a table where embeddings are stored and retrieved from.textColumn
(String textColumn) Configures the name of a column which stores text.
-
Method Details
-
createOption
Configures the option to create (or not create) a table. The default isCreateOption.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
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
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
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
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
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
Returns a new EmbeddingTable configured by this builder.- Returns:
- A new EmbeddingTable. Not null.
- Throws:
IllegalArgumentException
- If this builder is missing any required configuration.
-