@@ -232,7 +232,7 @@ async function withAutomaticRetries(request, options = {}) {
232
232
* @param {Replicate } client - The client used to upload the file
233
233
* @param {object } inputs - The inputs to transform
234
234
* @param {"default" | "upload" | "data-uri" } strategy - Whether to upload files to Replicate, encode as dataURIs or try both.
235
- * @returns {object } - The transformed inputs
235
+ * @returns {Promise< object> } - The transformed inputs
236
236
* @throws {ApiError } If the request to upload the file fails
237
237
*/
238
238
async function transformFileInputs ( client , inputs , strategy ) {
@@ -265,7 +265,7 @@ async function transformFileInputs(client, inputs, strategy) {
265
265
*
266
266
* @param {Replicate } client - The client used to upload the file
267
267
* @param {object } inputs - The inputs to transform
268
- * @returns {object } - The transformed inputs
268
+ * @returns {Promise< object> } - The transformed inputs
269
269
* @throws {ApiError } If the request to upload the file fails
270
270
*/
271
271
async function transformFileInputsToReplicateFileURLs ( client , inputs ) {
@@ -286,8 +286,8 @@ const MAX_DATA_URI_SIZE = 10_000_000;
286
286
* base64-encoded data URI.
287
287
*
288
288
* @param {object } inputs - The inputs to transform
289
- * @returns {object } - The transformed inputs
290
- * @throws {Error } If the size of inputs exceeds a given threshould set by MAX_DATA_URI_SIZE
289
+ * @returns {Promise< object> } - The transformed inputs
290
+ * @throws {Error } If the size of inputs exceeds a given threshold set by MAX_DATA_URI_SIZE
291
291
*/
292
292
async function transformFileInputsToBase64EncodedDataURIs ( inputs ) {
293
293
let totalBytes = 0 ;
@@ -296,10 +296,10 @@ async function transformFileInputsToBase64EncodedDataURIs(inputs) {
296
296
let mime ;
297
297
298
298
if ( value instanceof Blob ) {
299
- // Currently we use a NodeJS only API for base64 encoding, as
299
+ // Currently, we use a NodeJS only API for base64 encoding, as
300
300
// we move to support the browser we could support either using
301
301
// btoa (which does string encoding), the FileReader API or
302
- // a JavaScript implenentation like base64-js.
302
+ // a JavaScript implementation like base64-js.
303
303
// See: https://developer.mozilla.org/en-US/docs/Glossary/Base64
304
304
// See: https://github.com/beatgammit/base64-js
305
305
buffer = await value . arrayBuffer ( ) ;
0 commit comments