MCPcopy Index your code
hub / github.com/triggerdotdev/trigger.dev / create

Method create

integrations/replicate/src/trainings.ts:27–48  ·  view source on GitHub ↗

Create a new training.

(
    key: IntegrationTaskKey,
    params: {
      model_owner: string;
      model_name: string;
      version_id: string;
    } & Parameters<ReplicateClient["trainings"]["create"]>[3]
  )

Source from the content-addressed store, hash-verified

25
26 /** Create a new training. */
27 create(
28 key: IntegrationTaskKey,
29 params: {
30 model_owner: string;
31 model_name: string;
32 version_id: string;
33 } & Parameters<ReplicateClient["trainings"]["create"]>[3]
34 ): ReplicateReturnType<Training> {
35 return this.runTask(
36 key,
37 (client) => {
38 const { model_owner, model_name, version_id, ...options } = params;
39
40 return client.trainings.create(model_owner, model_name, version_id, options);
41 },
42 {
43 name: "Create Training",
44 params,
45 properties: modelProperties(params),
46 }
47 );
48 }
49
50 /** Create a new training and await the result. */
51 createAndAwait(

Callers

nothing calls this directly

Calls 3

modelPropertiesFunction · 0.90
createMethod · 0.65
runTaskMethod · 0.45

Tested by

no test coverage detected