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
Copy file name to clipboardExpand all lines: lib/predictions.js
+17-6Lines changed: 17 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -2,15 +2,16 @@
2
2
* Create a new prediction
3
3
*
4
4
* @param {object} options
5
-
* @param {string} options.version - Required. The model version
5
+
* @param {string} options.model - The model.
6
+
* @param {string} options.version - The model version.
6
7
* @param {object} options.input - Required. An object with the model inputs
7
8
* @param {string} [options.webhook] - An HTTPS URL for receiving a webhook when the prediction has new output
8
9
* @param {string[]} [options.webhook_events_filter] - You can change which events trigger webhook requests by specifying webhook events (`start`|`output`|`logs`|`completed`)
9
10
* @param {boolean} [options.stream] - Whether to stream the prediction output. Defaults to false
10
11
* @returns {Promise<object>} Resolves with the created prediction
11
12
*/
12
13
asyncfunctioncreatePrediction(options){
13
-
const{ stream, ...data}=options;
14
+
const{model, version,stream, ...data}=options;
14
15
15
16
if(data.webhook){
16
17
try{
@@ -21,10 +22,20 @@ async function createPrediction(options) {
0 commit comments