@@ -247,7 +247,7 @@ async function withAutomaticRetries(request, options = {}) {
247247 * @param {Replicate } client - The client used to upload the file
248248 * @param {object } inputs - The inputs to transform
249249 * @param {"default" | "upload" | "data-uri" } strategy - Whether to upload files to Replicate, encode as dataURIs or try both.
250- * @returns {object } - The transformed inputs
250+ * @returns {Promise< object> } - The transformed inputs
251251 * @throws {ApiError } If the request to upload the file fails
252252 */
253253async function transformFileInputs ( client , inputs , strategy ) {
@@ -280,7 +280,7 @@ async function transformFileInputs(client, inputs, strategy) {
280280 *
281281 * @param {Replicate } client - The client used to upload the file
282282 * @param {object } inputs - The inputs to transform
283- * @returns {object } - The transformed inputs
283+ * @returns {Promise< object> } - The transformed inputs
284284 * @throws {ApiError } If the request to upload the file fails
285285 */
286286async function transformFileInputsToReplicateFileURLs ( client , inputs ) {
@@ -301,8 +301,8 @@ const MAX_DATA_URI_SIZE = 10_000_000;
301301 * base64-encoded data URI.
302302 *
303303 * @param {object } inputs - The inputs to transform
304- * @returns {object } - The transformed inputs
305- * @throws {Error } If the size of inputs exceeds a given threshould set by MAX_DATA_URI_SIZE
304+ * @returns {Promise< object> } - The transformed inputs
305+ * @throws {Error } If the size of inputs exceeds a given threshold set by MAX_DATA_URI_SIZE
306306 */
307307async function transformFileInputsToBase64EncodedDataURIs ( inputs ) {
308308 let totalBytes = 0 ;
@@ -311,10 +311,10 @@ async function transformFileInputsToBase64EncodedDataURIs(inputs) {
311311 let mime ;
312312
313313 if ( value instanceof Blob ) {
314- // Currently we use a NodeJS only API for base64 encoding, as
314+ // Currently, we use a NodeJS only API for base64 encoding, as
315315 // we move to support the browser we could support either using
316316 // btoa (which does string encoding), the FileReader API or
317- // a JavaScript implenentation like base64-js.
317+ // a JavaScript implementation like base64-js.
318318 // See: https://developer.mozilla.org/en-US/docs/Glossary/Base64
319319 // See: https://github.com/beatgammit/base64-js
320320 buffer = await value . arrayBuffer ( ) ;
0 commit comments