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.
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"},
)
This PR updates
predictions.create
to support overloads withmodel
,version
, ordeployment
parameters. With these changes, API consumers can more easily change between official models, model versions, and deployments.