Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

miss the "name" Parameters at createPrediction func #76

Open
hawkit opened this issue Feb 26, 2024 · 0 comments
Open

miss the "name" Parameters at createPrediction func #76

hawkit opened this issue Feb 26, 2024 · 0 comments

Comments

@hawkit
Copy link

hawkit commented Feb 26, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant