Return FileOutput from `run()` function
This is currently behind the `useFileOutput` flag provided to the Replicate constructor. This allows us to test the feature before rolling it out more widely. When enabled any URLs or data-uris will be converted into a FileOutput type. This is essentially a `ReadableStream` that has two additional methods `url()` to return the underlying URL and `blob()` which will return a `Blob()` object with the file data loaded into memory. The intention here is to make it easier to work with file outputs and allows us to optimize the delivery of file assets to the client in future iterations.
A
Aron Carroll committed
0e609c468bbb5a0305ba01259b32f4cf2b32991d
Parent: 19d606d
Committed by Aron Carroll <aron@aroncarroll.com>
on 9/12/2024, 10:23:55 AM