Skip to content

Commit 1e10544

Browse files
committed
fix upgrading note about creating predictions
1 parent 76f31f2 commit 1e10544

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

UPGRADING.md

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,7 @@ Prediction objects have changed significantly. Instance methods like `wait()`, `
122122
#### Before (v1)
123123

124124
```python
125-
prediction = replicate.predictions.create(
126-
version="abc123...",
127-
input={"prompt": "..."},
128-
webhook="https://example.com/webhook"
129-
)
130-
131-
# Create via model
125+
# Create via model shorthand
132126
prediction = replicate.predictions.create(
133127
model="owner/model",
134128
input={"prompt": "..."}
@@ -138,14 +132,7 @@ prediction = replicate.predictions.create(
138132
#### After (v2)
139133

140134
```python
141-
# Version is required
142-
prediction = replicate.predictions.create(
143-
version="abc123...",
144-
input={"prompt": "..."},
145-
webhook="https://example.com/webhook"
146-
)
147-
148-
# Create via models resource (different structure)
135+
# Create with keyword arguments model_owner and model_name
149136
prediction = replicate.models.predictions.create(
150137
model_owner="owner",
151138
model_name="model",

0 commit comments

Comments
 (0)