Package com.google.genai.types
Class FileSearch
-
- All Implemented Interfaces:
public abstract class FileSearch extends JsonSerializable
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 Modifier and Type Class Description public abstract classFileSearch.BuilderBuilder for FileSearch.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description FileSearch()
-
Method Summary
Modifier and Type Method Description abstract Optional<List<String>>fileSearchStoreNames()Required. abstract Optional<Integer>topK()Optional. abstract Optional<String>metadataFilter()Optional. static FileSearch.Builderbuilder()Instantiates a builder for FileSearch. abstract FileSearch.BuildertoBuilder()Creates a builder with the same values as this instance. static FileSearchfromJson(String jsonString)Deserializes a JSON string to a FileSearch object. -
Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
fileSearchStoreNames
abstract Optional<List<String>> fileSearchStoreNames()
Required. The names of the file_search_stores to retrieve from. Example: `fileSearchStores/my-file-search-store-123`
-
topK
abstract Optional<Integer> topK()
Optional. The number of semantic retrieval chunks to retrieve.
-
metadataFilter
abstract Optional<String> metadataFilter()
Optional. Metadata filter to apply to the semantic retrieval documents and chunks.
-
builder
static FileSearch.Builder builder()
Instantiates a builder for FileSearch.
-
toBuilder
abstract FileSearch.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static FileSearch fromJson(String jsonString)
Deserializes a JSON string to a FileSearch object.
-
-
-
-