Skip to content
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

feat: get a full prediction, not just output #39

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zeke
Copy link
Member

@zeke zeke commented Feb 16, 2024

This PR updates the template to use replicate.predictions.create instead of replicate.run, to start new users off on the right foot, with awareness that there's a whole prediction object available to them, and not just the bare output.

This is useful because:

  • It gives people a prediction id, so they have a handle to associate their output with something via API or web.
  • It shows stats like prediction time
  • It shows the status of the prediction, and logs
  • It fits better with the eventuality of teaching users to use webhooks

Working through this revealed to me that the current process for awaiting a prediction with the JS client is not so glamorous: replicate/replicate-javascript#204

Not sure I wanna merge this. Curious to hear thoughts from @replicate/hackers and @replicate/product

@zeke zeke requested review from a team February 16, 2024 00:44
@deepfates
Copy link

I like this from a usability standpoint but from a wording standpoint i feel weird about showcasing replicate.wait this way. Just seems to imply that it will take a long time, while .run implies something happening right away. No strong block though

@zeke
Copy link
Member Author

zeke commented Feb 23, 2024

Changing this to a draft because it's more of a conversation piece than I thing I really want to land.

@erbridge erbridge removed the request for review from a team July 17, 2024 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants