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
/// Create a prediction using a deployment
///
/// - Parameters:
/// - owner:
/// The name of the deployment owner.
/// - name:
/// The name of the deployment.
/// - input:
/// The input depends on what model you are running.
///
/// To see the available inputs,
/// click the "Run with API" tab on the model you are running.
/// For example, stability-ai/stable-diffusion
/// takes prompt as an input.
/// - webhook:
/// A webhook that is called when the prediction has completed.
///
/// It will be a POST request where
/// the request body is the same as
/// the response body of the get prediction endpoint.
/// If there are network problems,
/// we will retry the webhook a few times,
/// so make sure it can be safely called more than once.
/// - stream:
/// Whether to stream the prediction output.
/// By default, this is false.
public func createPrediction<Input: Codable, Output: Codable>(
_ type: Prediction<Input, Output>.Type = AnyPrediction.self,
deployment id: Deployment.ID,
input: Input,
webhook: Webhook? = nil,
stream: Bool = false
)
The text was updated successfully, but these errors were encountered:
/// Create a prediction using a deployment
///
/// - Parameters:
/// - owner:
/// The name of the deployment owner.
/// - name:
/// The name of the deployment.
/// - input:
/// The input depends on what model you are running.
///
/// To see the available inputs,
/// click the "Run with API" tab on the model you are running.
/// For example, stability-ai/stable-diffusion
/// takes
prompt
as an input./// - webhook:
/// A webhook that is called when the prediction has completed.
///
/// It will be a
POST
request where/// the request body is the same as
/// the response body of the get prediction endpoint.
/// If there are network problems,
/// we will retry the webhook a few times,
/// so make sure it can be safely called more than once.
/// - stream:
/// Whether to stream the prediction output.
/// By default, this is
false
.public func createPrediction<Input: Codable, Output: Codable>(
_ type: Prediction<Input, Output>.Type = AnyPrediction.self,
deployment id: Deployment.ID,
input: Input,
webhook: Webhook? = nil,
stream: Bool = false
)
The text was updated successfully, but these errors were encountered: