-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support
predictions.create
with model
, version
, or deployment
…
… parameters (#290) This PR updates `predictions.create` to support overloads with `model`, `version`, or `deployment` parameters. With these changes, API consumers can more easily change between official models, model versions, and deployments. ```python import replicate prediction = replicate.predictions.create( model="meta/meta-llama-3-8b-instruct", input={"prompt": "write a haiku about corgis"}, ) prediction = replicate.predictions.create( version="39ed52f2a78e934b3ba6e2a89f5b1c712de7dfea535525255b1aa35c5565e08b", input={"prompt": "a studio photo of a rainbow colored corgi"}, ) prediction = replicate.predictions.create( deployment="my-username/my-embeddings-model", input={"text": "hello world"}, ) ``` --------- Signed-off-by: Mattt Zmuda <mattt@replicate.com>
- Loading branch information
Showing
17 changed files
with
3,509 additions
and
1,972 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.