Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add documentation comments to createFileOutput declaration
  • Loading branch information
mattt committed Sep 11, 2024
commit 5659b6c4ee033bf0198e136f7d2f4766982c09ba
9 changes: 9 additions & 0 deletions lib/stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,15 @@ function createReadableStream({ url, fetch, options = {} }) {
});
}

/**
* Create a new readable stream for an output file
* created by running a Replicate model.
*
* @param {object} config
* @param {string} config.url The URL to connect to.
* @param {typeof fetch} [config.fetch] The URL to connect to.
* @returns {ReadableStream<Uint8Array>}
*/
function createFileOutput({ url, fetch }) {
let type = "application/octet-stream";

Expand Down