Class FileSearch.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • fileSearchStoreNames

      public abstract FileSearch.Builder fileSearchStoreNames(List<String> fileSearchStoreNames)
      Setter for fileSearchStoreNames.

      fileSearchStoreNames: The names of the file_search_stores to retrieve from. Example: `fileSearchStores/my-file-search-store-123`

    • fileSearchStoreNames

      @CanIgnoreReturnValue public FileSearch.Builder fileSearchStoreNames(String... fileSearchStoreNames)
      Setter for fileSearchStoreNames.

      fileSearchStoreNames: The names of the file_search_stores to retrieve from. Example: `fileSearchStores/my-file-search-store-123`

    • clearFileSearchStoreNames

      @CanIgnoreReturnValue public FileSearch.Builder clearFileSearchStoreNames()
      Clears the value of fileSearchStoreNames field.
    • topK

      public abstract FileSearch.Builder topK(Integer topK)
      Setter for topK.

      topK: The number of file search retrieval chunks to retrieve.

    • clearTopK

      @CanIgnoreReturnValue public FileSearch.Builder clearTopK()
      Clears the value of topK field.
    • metadataFilter

      public abstract FileSearch.Builder metadataFilter(String metadataFilter)
      Setter for metadataFilter.

      metadataFilter: Metadata filter to apply to the file search retrieval documents. See https://google.aip.dev/160 for the syntax of the filter expression.

    • clearMetadataFilter

      @CanIgnoreReturnValue public FileSearch.Builder clearMetadataFilter()
      Clears the value of metadataFilter field.
    • build

      public abstract FileSearch build()