Package com.google.genai.types
Class FileSearch
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.FileSearch
The FileSearch tool that retrieves knowledge from Semantic Retrieval corpora. Files are imported
to Semantic Retrieval corpora using the ImportFile API. This data type is not supported in Vertex
AI.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.google.genai.JsonSerializable
MAX_READ_LENGTH_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FileSearch.Builderbuilder()Instantiates a builder for FileSearch.Required.static FileSearchDeserializes a JSON string to a FileSearch object.Optional.abstract FileSearch.BuilderCreates a builder with the same values as this instance.topK()Optional.Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString
-
Constructor Details
-
FileSearch
public FileSearch()
-
-
Method Details
-
fileSearchStoreNames
Required. The names of the file_search_stores to retrieve from. Example: `fileSearchStores/my-file-search-store-123` -
topK
Optional. The number of semantic retrieval chunks to retrieve. -
metadataFilter
Optional. Metadata filter to apply to the semantic retrieval documents and chunks. -
builder
Instantiates a builder for FileSearch. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a FileSearch object.
-