Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

docs: add migration guide for upgrading from v1 to v2 #76

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
7ffabdf
docs: add migration guide for upgrading from v1 to v2
zeke Oct 1, 2025
675922a
docs: remove unnecessary implementation detail about Prefer headers
zeke Oct 1, 2025
c0d4a38
docs: clarify "resource methods" terminology in migration guide
zeke Oct 1, 2025
e979d1b
docs: add section links to migration checklist
zeke Oct 1, 2025
734ec41
docs: clarify auto-pagination behavior in v2
zeke Oct 1, 2025
c6f1222
docs: add wait example for trainings to mirror v1
zeke Oct 1, 2025
822e831
docs: clarify file upload supports file handles without reading into ...
zeke Oct 1, 2025
5f53bd6
docs: correct async support in use() interface - v1 also had it
zeke Oct 1, 2025
76f31f2
docs: add documentation reference for APIResponse object
zeke Oct 1, 2025
1e10544
fix upgrading note about creating predictions
zeke Oct 1, 2025
f1dc6b0
remove unrelated comment about models.list()
zeke Oct 1, 2025
fbe8fce
docs: update streaming section to show replicate.use() with streaming...
zeke Oct 10, 2025
f6f6029
update client section of upgrade guide
zeke Oct 10, 2025
e82741d
docs: use anthropic/claude-4.5-sonnet in streaming examples
zeke Oct 10, 2025
31298dc
Update UPGRADING.md
zeke Oct 10, 2025
0bb7fdf
Update UPGRADING.md
zeke Oct 10, 2025
9917ddb
Update UPGRADING.md
zeke Oct 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs: correct async support in use() interface - v1 also had it
  • Loading branch information
zeke committed Oct 1, 2025
commit 5f53bd6ef999318c3065dbbb8ac162b1538e9784

Some comments aren't visible on the classic Files Changed page.

8 changes: 6 additions & 2 deletions UPGRADING.md
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -542,13 +542,17 @@ The validation logic is identical; only import paths may differ.

## Experimental use() interface

The experimental `use()` interface is available in both versions with similar functionality. V2 adds async support.
The experimental `use()` interface is available in both versions with similar functionality.

### Before (v1)

```python
flux = replicate.use("black-forest-labs/flux-schnell")
outputs = flux(prompt="astronaut on a horse")

# Async support
async_flux = replicate.use("black-forest-labs/flux-schnell")
outputs = await async_flux(prompt="astronaut on a horse")
```

### After (v2)
Expand All @@ -558,7 +562,7 @@ outputs = flux(prompt="astronaut on a horse")
flux = replicate.use("black-forest-labs/flux-schnell")
outputs = flux(prompt="astronaut on a horse")

# NEW: Async support
# Async support (uses use_async parameter)
async_flux = replicate.use("black-forest-labs/flux-schnell", use_async=True)
outputs = await async_flux(prompt="astronaut on a horse")
```
Expand Down

AltStyle によって変換されたページ (->オリジナル) /