Can you explain `webhook`, `webhook_completed`, and `webhook_events_filter`?
ethankongee opened this issue · 1 comments
ethankongee commented
I see these three options in the source code:
replicate-python/replicate/prediction.py
Line 87 in ea0fe2c
can you explain what are the differences?
mattt commented
Hi @ethank852. We have a write-up of webhooks here :https://replicate.com/docs/webhooks#setting-webhooks
To use webhooks, specify a
webhook
URL in the request body when creating a prediction.
By default, Replicate sends requests to your webhook URL whenever there are new logs, new outputs, or the prediction has finished. You can change which events trigger a webhook using the
webhook_events_filter
property.
webhook_completed
is a property on predictions that indicates whether all webhooks have finished sending.