The replicate.use() method is the successor to replicate.run() (we want to ensure both exist for now). It is intended as a high level interface over the Replicate HTTP API that provides a function like interface for a model.
For background on this change see: https://github.com/replicate/client-libraries-use-prototype
There exists an implementation in the existing replicate/replicate-python library on the beta branch: https://github.com/replicate/replicate-python/tree/beta
For users currently running pip install replicate --pre they get a pre-release version of replicate that doesn't include the use function. I'd like to fix this, and ideally make the stainless version the canonical implementation.
The README of the beta branch contains the API interface plus examples of usage.
https://github.com/replicate/replicate-python/tree/beta?tab=readme-ov-file#api-reference
Tasks
The
replicate.use()method is the successor toreplicate.run()(we want to ensure both exist for now). It is intended as a high level interface over the Replicate HTTP API that provides a function like interface for a model.For background on this change see: https://github.com/replicate/client-libraries-use-prototype
There exists an implementation in the existing replicate/replicate-python library on the
betabranch: https://github.com/replicate/replicate-python/tree/betaFor users currently running
pip install replicate --prethey get a pre-release version of replicate that doesn't include theusefunction. I'd like to fix this, and ideally make the stainless version the canonical implementation.The README of the beta branch contains the API interface plus examples of usage.
https://github.com/replicate/replicate-python/tree/beta?tab=readme-ov-file#api-reference
Tasks
replicate.use()for a spin in the prerelease npm package