replicate / replicate-swift

Swift client for Replicate
https://replicate.com
Apache License 2.0
157 stars 33 forks source link

miss the "name" Parameters at createPrediction func #76

Closed hawkit closed 1 month ago

hawkit commented 6 months ago

/// 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 )

mattt commented 1 month ago

Thanks for pointing this out, @hawkit. The docs were updated by https://github.com/replicate/replicate-swift/pull/89.