Skip to content

Commit 675922a

Browse files
committed
docs: remove unnecessary implementation detail about Prefer headers
1 parent 7ffabdf commit 675922a

File tree

1 file changed

+0
-38
lines changed

1 file changed

+0
-38
lines changed

UPGRADING.md

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -75,44 +75,6 @@ output = replicate.run(...)
7575

7676
The `api_token` parameter is still accepted for backward compatibility, but `bearer_token` is preferred.
7777

78-
## Running models
79-
80-
The basic `run()` method works similarly, but the `wait` parameter handling has changed.
81-
82-
### Before (v1)
83-
84-
```python
85-
# Wait up to 60 seconds (default)
86-
output = replicate.run(
87-
"black-forest-labs/flux-schnell",
88-
input={"prompt": "astronaut riding a rocket"}
89-
)
90-
91-
# Custom timeout
92-
output = replicate.run(..., wait=30)
93-
94-
# Don't wait
95-
output = replicate.run(..., wait=False)
96-
```
97-
98-
### After (v2)
99-
100-
```python
101-
# Wait up to 60 seconds (default)
102-
output = replicate.run(
103-
"black-forest-labs/flux-schnell",
104-
input={"prompt": "astronaut riding a rocket"}
105-
)
106-
107-
# Custom timeout
108-
output = replicate.run(..., wait=30)
109-
110-
# Don't wait
111-
output = replicate.run(..., wait=False)
112-
```
113-
114-
The interface is the same, but v2 uses HTTP `Prefer` headers internally for better standards compliance.
115-
11678
## Streaming output
11779

11880
Streaming works similarly, but prediction objects no longer have a `stream()` method.

0 commit comments

Comments
 (0)