Package com.google.genai
Class FileSearchStores
java.lang.Object
com.google.genai.FileSearchStores
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate(CreateFileSearchStoreConfig config) voiddelete(String name, DeleteFileSearchStoreConfig config) get(String name, GetFileSearchStoreConfig config) importFile(String fileSearchStoreName, String fileName, ImportFileConfig config) list(ListFileSearchStoresConfig config) Makes an API request to list the available file search stores.uploadToFileSearchStore(String fileSearchStoreName, byte[] bytes, UploadToFileSearchStoreConfig config) Uploads a file in bytes format to the file search store.uploadToFileSearchStore(String fileSearchStoreName, File file, UploadToFileSearchStoreConfig config) Uploads a file to the file search store.uploadToFileSearchStore(String fileSearchStoreName, InputStream inputStream, long size, UploadToFileSearchStoreConfig config) Uploads a file as input stream to the API.uploadToFileSearchStore(String fileSearchStoreName, String filePath, UploadToFileSearchStoreConfig config) Uploads a file to the API.
-
Field Details
-
documents
-
-
Constructor Details
-
FileSearchStores
public FileSearchStores(com.google.genai.ApiClient apiClient)
-
-
Method Details
-
create
-
get
-
delete
-
importFile
public ImportFileOperation importFile(String fileSearchStoreName, String fileName, ImportFileConfig config) -
list
Makes an API request to list the available file search stores.- Parameters:
config- AListFileSearchStoresConfigfor configuring the list request.- Returns:
- A
Pagerobject that contains the list of file search stores. The pager is an iterable and automatically queries the next page once the current page is exhausted.
-
uploadToFileSearchStore
public UploadToFileSearchStoreOperation uploadToFileSearchStore(String fileSearchStoreName, File file, UploadToFileSearchStoreConfig config) Uploads a file to the file search store.- Parameters:
fileSearchStoreName- The name of the file search store to upload to.file- The file to upload.config- The configuration for the upload.- Returns:
- The long running operation of uploading.
-
uploadToFileSearchStore
public UploadToFileSearchStoreOperation uploadToFileSearchStore(String fileSearchStoreName, byte[] bytes, UploadToFileSearchStoreConfig config) Uploads a file in bytes format to the file search store.- Parameters:
fileSearchStoreName- The name of the file search store to upload to.bytes- The bytes of the file to upload.config- The configuration for the upload.- Returns:
- The long running operation of uploading.
-
uploadToFileSearchStore
public UploadToFileSearchStoreOperation uploadToFileSearchStore(String fileSearchStoreName, InputStream inputStream, long size, UploadToFileSearchStoreConfig config) Uploads a file as input stream to the API.- Parameters:
fileSearchStoreName- The name of the file search store to upload to.inputStream- The input stream of the file to upload.size- The size of the file to upload.config- The configuration for the upload.- Returns:
- The uploaded file.
-
uploadToFileSearchStore
public UploadToFileSearchStoreOperation uploadToFileSearchStore(String fileSearchStoreName, String filePath, UploadToFileSearchStoreConfig config) Uploads a file to the API.- Parameters:
fileSearchStoreName- The name of the file search store to upload to.filePath- The path of the file to upload.config- The configuration for the upload.- Returns:
- The uploaded file.
-