Class RetrievalMetadata.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • googleSearchDynamicRetrievalScore

      public abstract RetrievalMetadata.Builder googleSearchDynamicRetrievalScore(Float googleSearchDynamicRetrievalScore)
      Setter for googleSearchDynamicRetrievalScore.

      googleSearchDynamicRetrievalScore: Optional. Score indicating how likely information from Google Search could help answer the prompt. The score is in the range `[0, 1]`, where 0 is the least likely and 1 is the most likely. This score is only populated when Google Search grounding and dynamic retrieval is enabled. It will be compared to the threshold to determine whether to trigger Google Search.

    • build

      public abstract RetrievalMetadata build()