Class FileCreateParams
-
- All Implemented Interfaces:
-
com.openai.core.Params
public final class FileCreateParams implements Params
Create a vector store file by attaching a File to a vector store.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
FileCreateParams.Builder
A builder for FileCreateParams.
public final class
FileCreateParams.Body
public final class
FileCreateParams.Attributes
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.
-
Method Summary
Modifier and Type Method Description final String
vectorStoreId()
final String
fileId()
A File ID that the vector store should use. final Optional<FileCreateParams.Attributes>
attributes()
Set of 16 key-value pairs that can be attached to an object. final Optional<FileChunkingStrategyParam>
chunkingStrategy()
The chunking strategy used to chunk the file(s). final JsonField<String>
_fileId()
Returns the raw JSON value of fileId. final JsonField<FileCreateParams.Attributes>
_attributes()
Returns the raw JSON value of attributes. final JsonField<FileChunkingStrategyParam>
_chunkingStrategy()
Returns the raw JSON value of chunkingStrategy. final Map<String, JsonValue>
_additionalBodyProperties()
final Headers
_additionalHeaders()
final QueryParams
_additionalQueryParams()
final FileCreateParams.Builder
toBuilder()
final FileCreateParams.Body
_body()
final String
_pathParam(Integer index)
Headers
_headers()
The full set of headers in the parameters, including both fixed and additional headers. QueryParams
_queryParams()
The full set of query params in the parameters, including both fixed and additional query params. Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static FileCreateParams.Builder
builder()
Returns a mutable builder for constructing an instance of FileCreateParams. -
-
Method Detail
-
vectorStoreId
final String vectorStoreId()
-
fileId
final String fileId()
A File ID that the vector store should use. Useful for tools like
file_search
that can access files.
-
attributes
final Optional<FileCreateParams.Attributes> attributes()
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.
-
chunkingStrategy
final Optional<FileChunkingStrategyParam> chunkingStrategy()
The chunking strategy used to chunk the file(s). If not set, will use the
auto
strategy. Only applicable iffile_ids
is non-empty.
-
_fileId
final JsonField<String> _fileId()
Returns the raw JSON value of fileId.
Unlike fileId, this method doesn't throw if the JSON field has an unexpected type.
-
_attributes
final JsonField<FileCreateParams.Attributes> _attributes()
Returns the raw JSON value of attributes.
Unlike attributes, this method doesn't throw if the JSON field has an unexpected type.
-
_chunkingStrategy
final JsonField<FileChunkingStrategyParam> _chunkingStrategy()
Returns the raw JSON value of chunkingStrategy.
Unlike chunkingStrategy, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalBodyProperties
final Map<String, JsonValue> _additionalBodyProperties()
-
_additionalHeaders
final Headers _additionalHeaders()
-
_additionalQueryParams
final QueryParams _additionalQueryParams()
-
toBuilder
final FileCreateParams.Builder toBuilder()
-
_body
final FileCreateParams.Body _body()
-
_pathParam
final String _pathParam(Integer index)
-
_headers
Headers _headers()
The full set of headers in the parameters, including both fixed and additional headers.
-
_queryParams
QueryParams _queryParams()
The full set of query params in the parameters, including both fixed and additional query params.
-
builder
final static FileCreateParams.Builder builder()
Returns a mutable builder for constructing an instance of FileCreateParams.
The following fields are required:
.vectorStoreId() .fileId()
-
-
-
-