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/models.js
-27Lines changed: 0 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -89,36 +89,9 @@ async function createModel(model_owner, model_name, options) {
89
89
returnresponse.json();
90
90
}
91
91
92
-
/**
93
-
* Create a new prediction
94
-
*
95
-
* @param {string} model_owner - Required. The name of the user or organization that owns the model
96
-
* @param {string} model_name - Required. The name of the model
97
-
* @param {object} options
98
-
* @param {object} options.input - Required. An object with the model inputs
99
-
* @param {string} [options.webhook] - An HTTPS URL for receiving a webhook when the prediction has new output
100
-
* @param {string[]} [options.webhook_events_filter] - You can change which events trigger webhook requests by specifying webhook events (`start`|`output`|`logs`|`completed`)
101
-
* @param {boolean} [options.stream] - Whether to stream the prediction output. Defaults to false
102
-
* @returns {Promise<object>} Resolves with the created prediction
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