Class PineconeIndexConfig.Builder
java.lang.Object
com.google.genkit.plugins.pinecone.PineconeIndexConfig.Builder
- Enclosing class:
PineconeIndexConfig
Builder for PineconeIndexConfig.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadditionalMetadata(String key, Object value) Adds additional metadata to include with all indexed documents.additionalMetadata(Map<String, Object> metadata) Sets all additional metadata to include with indexed documents.build()Builds the PineconeIndexConfig.cloud(PineconeIndexConfig.Cloud cloud) Sets the cloud provider for serverless index (default: AWS).createIndexIfNotExists(boolean createIndexIfNotExists) Sets whether to create the index if it doesn't exist (default: false).dimension(int dimension) Sets the vector dimension (default: 768).embedderName(String embedderName) Sets the embedder name for generating vectors (required).Sets the index name (required).metric(PineconeIndexConfig.Metric metric) Sets the similarity metric (default: COSINE).Sets the namespace (default: "" - default namespace).Sets the region for serverless index (default: "us-east-1").Sets the metadata field name for storing document text (default: "text").
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
indexName
Sets the index name (required). -
embedderName
Sets the embedder name for generating vectors (required). -
namespace
Sets the namespace (default: "" - default namespace). -
dimension
Sets the vector dimension (default: 768). -
metric
Sets the similarity metric (default: COSINE). -
cloud
Sets the cloud provider for serverless index (default: AWS). -
region
Sets the region for serverless index (default: "us-east-1"). -
createIndexIfNotExists
Sets whether to create the index if it doesn't exist (default: false). -
textField
Sets the metadata field name for storing document text (default: "text"). -
additionalMetadata
Adds additional metadata to include with all indexed documents. -
additionalMetadata
Sets all additional metadata to include with indexed documents. -
build
Builds the PineconeIndexConfig.- Throws:
IllegalStateException- if required fields are not set
-