You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`options.version`| string |**Required**. The model version |
188
+
|`options.input`| object |**Required**. An object with the models inputs |
189
+
|`options.webhook`| string | An HTTPS URL for receiving a webhook when the prediction has new output |
190
+
|`options.webhook_events_filter`| string[]| You can change which events trigger webhook requests by specifying webhook events (`start`\|`output`\|`logs`\|`completed`) |
Copy file name to clipboardExpand all lines: index.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,8 @@ class Replicate {
74
74
* @param {boolean|object} [options.wait] - Whether to wait for the prediction to finish. Defaults to false
75
75
* @param {number} [options.wait.interval] - Polling interval in milliseconds. Defaults to 250
76
76
* @param {number} [options.wait.maxAttempts] - Maximum number of polling attempts. Defaults to no limit
77
-
* @param {string} [options.webhook_completed] - A URL which will receive a POST request upon completion of the prediction
77
+
* @param {string} [options.webhook] - An HTTPS URL for receiving a webhook when the prediction has new output
78
+
* @param {string[]} [options.webhook_events_filter] - You can change which events trigger webhook requests by specifying webhook events (`start`|`output`|`logs`|`completed`)
78
79
* @throws {Error} If the prediction failed
79
80
* @returns {Promise<object>} - Resolves with the output of running the model
Copy file name to clipboardExpand all lines: lib/predictions.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,8 @@
7
7
* @param {boolean|object} [options.wait] - Whether to wait for the prediction to finish. Defaults to false
8
8
* @param {number} [options.wait.interval] - Polling interval in milliseconds. Defaults to 250
9
9
* @param {number} [options.wait.maxAttempts] - Maximum number of polling attempts. Defaults to no limit
10
-
* @param {string} [options.webhook_completed] - A URL which will receive a POST request upon completion of the prediction
10
+
* @param {string} [options.webhook] - An HTTPS URL for receiving a webhook when the prediction has new output
11
+
* @param {string[]} [options.webhook_events_filter] - You can change which events trigger webhook requests by specifying webhook events (`start`|`output`|`logs`|`completed`)
11
12
* @returns {Promise<object>} Resolves with the created prediction data
0 commit comments