Create a new prediction with a deployment.
(
key: IntegrationTaskKey,
params: {
deployment_owner: string;
deployment_name: string;
} & Parameters<ReplicateClient["deployments"]["predictions"]["create"]>[2]
)
| 18 | |
| 19 | /** Create a new prediction with a deployment. */ |
| 20 | create( |
| 21 | key: IntegrationTaskKey, |
| 22 | params: { |
| 23 | deployment_owner: string; |
| 24 | deployment_name: string; |
| 25 | } & Parameters<ReplicateClient["deployments"]["predictions"]["create"]>[2] |
| 26 | ): ReplicateReturnType<Prediction> { |
| 27 | return this.runTask( |
| 28 | key, |
| 29 | (client) => { |
| 30 | const { deployment_owner, deployment_name, ...options } = params; |
| 31 | |
| 32 | return client.deployments.predictions.create(deployment_owner, deployment_name, options); |
| 33 | }, |
| 34 | { |
| 35 | name: "Create Prediction With Deployment", |
| 36 | params, |
| 37 | properties: createDeploymentProperties(params), |
| 38 | } |
| 39 | ); |
| 40 | } |
| 41 | |
| 42 | /** Create a new prediction with a deployment and await the result. */ |
| 43 | createAndAwait( |
nothing calls this directly
no test coverage detected