@@ -232,7 +232,7 @@ async function withAutomaticRetries(request, options = {}) {
232232 * @param {Replicate } client - The client used to upload the file
233233 * @param {object } inputs - The inputs to transform
234234 * @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
236236 * @throws {ApiError } If the request to upload the file fails
237237 */
238238async function transformFileInputs ( client , inputs , strategy ) {
@@ -265,7 +265,7 @@ async function transformFileInputs(client, inputs, strategy) {
265265 *
266266 * @param {Replicate } client - The client used to upload the file
267267 * @param {object } inputs - The inputs to transform
268- * @returns {object } - The transformed inputs
268+ * @returns {Promise< object> } - The transformed inputs
269269 * @throws {ApiError } If the request to upload the file fails
270270 */
271271async function transformFileInputsToReplicateFileURLs ( client , inputs ) {
@@ -286,8 +286,8 @@ const MAX_DATA_URI_SIZE = 10_000_000;
286286 * base64-encoded data URI.
287287 *
288288 * @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
291291 */
292292async function transformFileInputsToBase64EncodedDataURIs ( inputs ) {
293293 let totalBytes = 0 ;
@@ -296,10 +296,10 @@ async function transformFileInputsToBase64EncodedDataURIs(inputs) {
296296 let mime ;
297297
298298 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
300300 // we move to support the browser we could support either using
301301 // btoa (which does string encoding), the FileReader API or
302- // a JavaScript implenentation like base64-js.
302+ // a JavaScript implementation like base64-js.
303303 // See: https://developer.mozilla.org/en-US/docs/Glossary/Base64
304304 // See: https://github.com/beatgammit/base64-js
305305 buffer = await value . arrayBuffer ( ) ;
0 commit comments