Class AnalyticDbVectorStore.Builder

java.lang.Object
org.springframework.ai.vectorstore.AbstractVectorStoreBuilder<AnalyticDbVectorStore.Builder>
com.alibaba.cloud.ai.vectorstore.analyticdb.AnalyticDbVectorStore.Builder
All Implemented Interfaces:
org.springframework.ai.vectorstore.VectorStore.Builder<AnalyticDbVectorStore.Builder>
Enclosing class:
AnalyticDbVectorStore

public static class AnalyticDbVectorStore.Builder extends org.springframework.ai.vectorstore.AbstractVectorStoreBuilder<AnalyticDbVectorStore.Builder>
Builder class for creating AnalyticDbVectorStore instances.

Provides a fluent API for configuring all aspects of the Analyticdb vector store.

Since:
1.0.0
  • Method Details

    • defaultTopK

      public AnalyticDbVectorStore.Builder defaultTopK(int defaultTopK)
      Sets the default maximum number of similar documents to return.
      Parameters:
      defaultTopK - the maximum number of documents
      Returns:
      the builder instance
      Throws:
      IllegalArgumentException - if defaultTopK is negative
    • defaultSimilarityThreshold

      public AnalyticDbVectorStore.Builder defaultSimilarityThreshold(Double defaultSimilarityThreshold)
      Sets the default similarity threshold for returned documents.
      Parameters:
      defaultSimilarityThreshold - the similarity threshold (must be between 0.0 and 1.0)
      Returns:
      the builder instance
      Throws:
      IllegalArgumentException - if defaultSimilarityThreshold is not between 0.0 and 1.0
    • build

      public AnalyticDbVectorStore build()