Class AsyncFileClient
- java.lang.Object
-
- ai.extend.resources.file.AsyncFileClient
-
public class AsyncFileClient extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected ClientOptionsclientOptions
-
Constructor Summary
Constructors Constructor Description AsyncFileClient(ClientOptions clientOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<FileDeleteResponse>delete(java.lang.String id)Delete a file and all associated data from Extend.java.util.concurrent.CompletableFuture<FileDeleteResponse>delete(java.lang.String id, RequestOptions requestOptions)Delete a file and all associated data from Extend.java.util.concurrent.CompletableFuture<FileGetResponse>get(java.lang.String id)Fetch a file by its ID to obtain additional details and the raw file content.java.util.concurrent.CompletableFuture<FileGetResponse>get(java.lang.String id, FileGetRequest request)Fetch a file by its ID to obtain additional details and the raw file content.java.util.concurrent.CompletableFuture<FileGetResponse>get(java.lang.String id, FileGetRequest request, RequestOptions requestOptions)Fetch a file by its ID to obtain additional details and the raw file content.java.util.concurrent.CompletableFuture<FileListResponse>list()List files in your account.java.util.concurrent.CompletableFuture<FileListResponse>list(FileListRequest request)List files in your account.java.util.concurrent.CompletableFuture<FileListResponse>list(FileListRequest request, RequestOptions requestOptions)List files in your account.java.util.concurrent.CompletableFuture<FileUploadResponse>upload(java.io.File file, FileUploadRequest request)Upload and create a new file in Extend.java.util.concurrent.CompletableFuture<FileUploadResponse>upload(java.io.File file, FileUploadRequest request, RequestOptions requestOptions)Upload and create a new file in Extend.AsyncRawFileClientwithRawResponse()Get responses with HTTP metadata like headers
-
-
-
Field Detail
-
clientOptions
protected final ClientOptions clientOptions
-
-
Constructor Detail
-
AsyncFileClient
public AsyncFileClient(ClientOptions clientOptions)
-
-
Method Detail
-
withRawResponse
public AsyncRawFileClient withRawResponse()
Get responses with HTTP metadata like headers
-
list
public java.util.concurrent.CompletableFuture<FileListResponse> list()
List files in your account. Files represent documents that have been uploaded to Extend. This endpoint returns a paginated response. You can use thenextPageTokento fetch subsequent results.
-
list
public java.util.concurrent.CompletableFuture<FileListResponse> list(FileListRequest request)
List files in your account. Files represent documents that have been uploaded to Extend. This endpoint returns a paginated response. You can use thenextPageTokento fetch subsequent results.
-
list
public java.util.concurrent.CompletableFuture<FileListResponse> list(FileListRequest request, RequestOptions requestOptions)
List files in your account. Files represent documents that have been uploaded to Extend. This endpoint returns a paginated response. You can use thenextPageTokento fetch subsequent results.
-
get
public java.util.concurrent.CompletableFuture<FileGetResponse> get(java.lang.String id)
Fetch a file by its ID to obtain additional details and the raw file content.
-
get
public java.util.concurrent.CompletableFuture<FileGetResponse> get(java.lang.String id, FileGetRequest request)
Fetch a file by its ID to obtain additional details and the raw file content.
-
get
public java.util.concurrent.CompletableFuture<FileGetResponse> get(java.lang.String id, FileGetRequest request, RequestOptions requestOptions)
Fetch a file by its ID to obtain additional details and the raw file content.
-
delete
public java.util.concurrent.CompletableFuture<FileDeleteResponse> delete(java.lang.String id)
Delete a file and all associated data from Extend. This operation is permanent and cannot be undone.This endpoint can be used if you'd like to manage data retention on your own rather than automated data retention policies. Or make one-off deletions for your downstream customers.
-
delete
public java.util.concurrent.CompletableFuture<FileDeleteResponse> delete(java.lang.String id, RequestOptions requestOptions)
Delete a file and all associated data from Extend. This operation is permanent and cannot be undone.This endpoint can be used if you'd like to manage data retention on your own rather than automated data retention policies. Or make one-off deletions for your downstream customers.
-
upload
public java.util.concurrent.CompletableFuture<FileUploadResponse> upload(java.io.File file, FileUploadRequest request)
Upload and create a new file in Extend.This endpoint accepts file contents and registers them as a File in Extend, which can be used for running workflows, creating evaluation set items, parsing, etc.
If an uploaded file is detected as a Word or PowerPoint document, it will be automatically converted to a PDF.
Supported file types can be found here.
This endpoint requires multipart form encoding. Most HTTP clients will handle this encoding automatically (see the examples).
-
upload
public java.util.concurrent.CompletableFuture<FileUploadResponse> upload(java.io.File file, FileUploadRequest request, RequestOptions requestOptions)
Upload and create a new file in Extend.This endpoint accepts file contents and registers them as a File in Extend, which can be used for running workflows, creating evaluation set items, parsing, etc.
If an uploaded file is detected as a Word or PowerPoint document, it will be automatically converted to a PDF.
Supported file types can be found here.
This endpoint requires multipart form encoding. Most HTTP clients will handle this encoding automatically (see the examples).
-
-