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