Class ChromaVectorStore.Builder

java.lang.Object
org.springframework.ai.vectorstore.AbstractVectorStoreBuilder<ChromaVectorStore.Builder>
org.springframework.ai.chroma.vectorstore.ChromaVectorStore.Builder
All Implemented Interfaces:
org.springframework.ai.vectorstore.VectorStore.Builder<ChromaVectorStore.Builder>
Enclosing class:
ChromaVectorStore

public static class ChromaVectorStore.Builder extends org.springframework.ai.vectorstore.AbstractVectorStoreBuilder<ChromaVectorStore.Builder>
  • Method Details

    • tenantName

      public ChromaVectorStore.Builder tenantName(String tenantName)
      Sets the tenant name.
      Parameters:
      tenantName - the name of the tenant
      Returns:
      the builder instance
      Throws:
      IllegalArgumentException - if collectionName is null or empty
    • databaseName

      public ChromaVectorStore.Builder databaseName(String databaseName)
      Sets the database name.
      Parameters:
      databaseName - the name of the database
      Returns:
      the builder instance
      Throws:
      IllegalArgumentException - if collectionName is null or empty
    • collectionName

      public ChromaVectorStore.Builder collectionName(String collectionName)
      Sets the collection name.
      Parameters:
      collectionName - the name of the collection
      Returns:
      the builder instance
      Throws:
      IllegalArgumentException - if collectionName is null or empty
    • initializeSchema

      public ChromaVectorStore.Builder initializeSchema(boolean initializeSchema)
      Sets whether to initialize the schema.
      Parameters:
      initializeSchema - true to initialize schema, false otherwise
      Returns:
      the builder instance
    • filterExpressionConverter

      public ChromaVectorStore.Builder filterExpressionConverter(org.springframework.ai.vectorstore.filter.FilterExpressionConverter converter)
      Sets the filter expression converter.
      Parameters:
      converter - the filter expression converter to use
      Returns:
      the builder instance
      Throws:
      IllegalArgumentException - if converter is null
    • initializeImmediately

      public ChromaVectorStore.Builder initializeImmediately(boolean initialize)
      Sets whether to initialize immediately.
      Parameters:
      initialize - true to initialize immediately, false otherwise
      Returns:
      the builder instance
    • build

      public ChromaVectorStore build()
      Builds the ChromaVectorStore instance.
      Returns:
      a new ChromaVectorStore instance
      Throws:
      IllegalStateException - if the builder is in an invalid state