Class FileCreateParams.Body.Builder
-
- All Implemented Interfaces:
public final class FileCreateParams.Body.Builder
A builder for Body.
-
-
Method Summary
Modifier and Type Method Description final FileCreateParams.Body.Builder
file(InputStream file)
The File object (not file name) to be uploaded. final FileCreateParams.Body.Builder
file(MultipartField<InputStream> file)
The File object (not file name) to be uploaded. final FileCreateParams.Body.Builder
file(ByteArray file)
The File object (not file name) to be uploaded. final FileCreateParams.Body.Builder
file(Path file)
The File object (not file name) to be uploaded. final FileCreateParams.Body.Builder
purpose(FilePurpose purpose)
The intended purpose of the uploaded file. final FileCreateParams.Body.Builder
purpose(MultipartField<FilePurpose> purpose)
The intended purpose of the uploaded file. final FileCreateParams.Body
build()
Returns an immutable instance of Body. -
-
Method Detail
-
file
final FileCreateParams.Body.Builder file(InputStream file)
The File object (not file name) to be uploaded.
-
file
final FileCreateParams.Body.Builder file(MultipartField<InputStream> file)
The File object (not file name) to be uploaded.
-
file
final FileCreateParams.Body.Builder file(ByteArray file)
The File object (not file name) to be uploaded.
-
file
final FileCreateParams.Body.Builder file(Path file)
The File object (not file name) to be uploaded.
-
purpose
final FileCreateParams.Body.Builder purpose(FilePurpose purpose)
The intended purpose of the uploaded file. One of: -
assistants
: Used in the Assistants API -batch
: Used in the Batch API -fine-tune
: Used for fine-tuning -vision
: Images used for vision fine-tuning -user_data
: Flexible file type for any purpose -evals
: Used for eval data sets
-
purpose
final FileCreateParams.Body.Builder purpose(MultipartField<FilePurpose> purpose)
The intended purpose of the uploaded file. One of: -
assistants
: Used in the Assistants API -batch
: Used in the Batch API -fine-tune
: Used for fine-tuning -vision
: Images used for vision fine-tuning -user_data
: Flexible file type for any purpose -evals
: Used for eval data sets
-
build
final FileCreateParams.Body build()
Returns an immutable instance of Body.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.file() .purpose()
-
-
-
-