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

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

      ragCorpora: Optional. Deprecated. Please use rag_resources instead.

    • 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

      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

      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.

    • ragRetrievalConfig

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

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

    • ragRetrievalConfig

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

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

    • similarityTopK

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

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

    • 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.

    • vectorDistanceThreshold

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

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

    • build

      public abstract VertexRagStore build()