Class FileSearch

java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.FileSearch

public abstract class FileSearch extends JsonSerializable
Tool to retrieve knowledge from the File Search Stores.
  • Constructor Details

    • FileSearch

      public FileSearch()
  • Method Details

    • fileSearchStoreNames

      public abstract Optional<List<String>> fileSearchStoreNames()
      The names of the file_search_stores to retrieve from. Example: `fileSearchStores/my-file-search-store-123`
    • topK

      public abstract Optional<Integer> topK()
      The number of file search retrieval chunks to retrieve.
    • metadataFilter

      public abstract Optional<String> metadataFilter()
      Metadata filter to apply to the file search retrieval documents. See https://google.aip.dev/160 for the syntax of the filter expression.
    • builder

      public static FileSearch.Builder builder()
      Instantiates a builder for FileSearch.
    • toBuilder

      public abstract FileSearch.Builder toBuilder()
      Creates a builder with the same values as this instance.
    • fromJson

      public static FileSearch fromJson(String jsonString)
      Deserializes a JSON string to a FileSearch object.