Class VertexRagStore.Builder

java.lang.Object
com.google.genai.types.VertexRagStore.Builder
Enclosing class:
VertexRagStore

public abstract static class VertexRagStore.Builder extends Object
Builder for VertexRagStore.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • ragCorpora

      public abstract VertexRagStore.Builder ragCorpora(List<String> ragCorpora)
      Setter for ragCorpora.

      ragCorpora: Optional. Deprecated. Please use rag_resources instead.

    • ragCorpora

      @CanIgnoreReturnValue public VertexRagStore.Builder ragCorpora(String... ragCorpora)
      Setter for ragCorpora.

      ragCorpora: Optional. Deprecated. Please use rag_resources instead.

    • clearRagCorpora

      @CanIgnoreReturnValue public VertexRagStore.Builder clearRagCorpora()
      Clears the value of ragCorpora field.
    • ragResources

      public abstract VertexRagStore.Builder ragResources(List<VertexRagStoreRagResource> ragResources)
      Setter for ragResources.

      ragResources: Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support.

    • ragResources

      @CanIgnoreReturnValue public VertexRagStore.Builder ragResources(VertexRagStoreRagResource... ragResources)
      Setter for ragResources.

      ragResources: Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support.

    • ragResources

      @CanIgnoreReturnValue public VertexRagStore.Builder ragResources(VertexRagStoreRagResource.Builder... ragResourcesBuilders)
      Setter for ragResources builder.

      ragResources: Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support.

    • clearRagResources

      @CanIgnoreReturnValue public VertexRagStore.Builder clearRagResources()
      Clears the value of ragResources field.
    • ragRetrievalConfig

      public abstract VertexRagStore.Builder ragRetrievalConfig(RagRetrievalConfig ragRetrievalConfig)
      Setter for ragRetrievalConfig.

      ragRetrievalConfig: Optional. The retrieval config for the Rag query.

    • ragRetrievalConfig

      @CanIgnoreReturnValue public VertexRagStore.Builder ragRetrievalConfig(RagRetrievalConfig.Builder ragRetrievalConfigBuilder)
      Setter for ragRetrievalConfig builder.

      ragRetrievalConfig: Optional. The retrieval config for the Rag query.

    • clearRagRetrievalConfig

      @CanIgnoreReturnValue public VertexRagStore.Builder clearRagRetrievalConfig()
      Clears the value of ragRetrievalConfig field.
    • similarityTopK

      public abstract VertexRagStore.Builder similarityTopK(Integer similarityTopK)
      Setter for similarityTopK.

      similarityTopK: Optional. Number of top k results to return from the selected corpora.

    • clearSimilarityTopK

      @CanIgnoreReturnValue public VertexRagStore.Builder clearSimilarityTopK()
      Clears the value of similarityTopK field.
    • storeContext

      public abstract VertexRagStore.Builder storeContext(boolean storeContext)
      Setter for storeContext.

      storeContext: Optional. Currently only supported for Gemini Multimodal Live API. In Gemini Multimodal Live API, if `store_context` bool is specified, Gemini will leverage it to automatically memorize the interactions between the client and Gemini, and retrieve context when needed to augment the response generation for users' ongoing and future interactions.

    • clearStoreContext

      @CanIgnoreReturnValue public VertexRagStore.Builder clearStoreContext()
      Clears the value of storeContext field.
    • vectorDistanceThreshold

      public abstract VertexRagStore.Builder vectorDistanceThreshold(Double vectorDistanceThreshold)
      Setter for vectorDistanceThreshold.

      vectorDistanceThreshold: Optional. Only return results with vector distance smaller than the threshold.

    • clearVectorDistanceThreshold

      @CanIgnoreReturnValue public VertexRagStore.Builder clearVectorDistanceThreshold()
      Clears the value of vectorDistanceThreshold field.
    • build

      public abstract VertexRagStore build()