upload
Asynchronously uploads a file to the GenAI API.
Return
A future that resolves to the uploaded file.
Parameters
file
The file to upload.
config
The configuration for the upload.
Asynchronously uploads a bytes array as a file to the GenAI API.
Return
A future that resolves to the uploaded file.
Parameters
bytes
The bytes of the file to upload.
config
The configuration for the upload.
Asynchronously uploads a stream as a file to the GenAI API.
Return
A future that resolves to the uploaded file.
Parameters
stream
The stream of the file to upload.
size
The size of the file in bytes.
config
The configuration for the upload.
Asynchronously uploads a file by its path to the GenAI API.
Return
A future that resolves to the uploaded file.
Parameters
file Path
The path to the file to upload.
config
The configuration for the upload.