( input: T, )
| 108 | // TODO: fix the passThroughNulls type from utils.ts to work with generics and |
| 109 | // wrap this with that for better ergonomics. |
| 110 | export function typedFineTune<T extends Pick<FineTune, "baseModel" | "provider">>( |
| 111 | input: T, |
| 112 | ): Omit<T, "baseModel" | "provider" | "trainingConfig" | "trainingConfigOverrides"> & |
| 113 | z.infer<typeof fineTuneSchema> { |
| 114 | return fineTuneSchema.parse(input); |
| 115 | } |
| 116 | |
| 117 | export type TypedFineTune = ReturnType<typeof typedFineTune<FineTune>>; |
| 118 |
no outgoing calls
no test coverage detected