/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 62e15865e018
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
/** @internal */
export const CompletionTrainingParameters$inboundSchema = z.object({
    training_steps: z.nullable(z.int()).optional(),
    learning_rate: z.number().default(0.0001),
    weight_decay: z.nullable(z.number()).optional(),
    warmup_fraction: z.nullable(z.number()).optional(),
    epochs: z.nullable(z.number()).optional(),
    seq_len: z.nullable(z.int()).optional(),
    fim_ratio: z.nullable(z.number()).optional(),
}).transform((v) => {
    return remap$(v, {
        "training_steps": "trainingSteps",
        "learning_rate": "learningRate",
        "weight_decay": "weightDecay",
        "warmup_fraction": "warmupFraction",
        "seq_len": "seqLen",
        "fim_ratio": "fimRatio",
    });
});
/** @internal */
export const CompletionTrainingParameters$outboundSchema = z.object({
    trainingSteps: z.nullable(z.int()).optional(),
    learningRate: z.number().default(0.0001),
    weightDecay: z.nullable(z.number()).optional(),
    warmupFraction: z.nullable(z.number()).optional(),
    epochs: z.nullable(z.number()).optional(),
    seqLen: z.nullable(z.int()).optional(),
    fimRatio: z.nullable(z.number()).optional(),
}).transform((v) => {
    return remap$(v, {
        trainingSteps: "training_steps",
        learningRate: "learning_rate",
        weightDecay: "weight_decay",
        warmupFraction: "warmup_fraction",
        seqLen: "seq_len",
        fimRatio: "fim_ratio",
    });
});
export function completionTrainingParametersToJSON(completionTrainingParameters) {
    return JSON.stringify(CompletionTrainingParameters$outboundSchema.parse(completionTrainingParameters));
}
export function completionTrainingParametersFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CompletionTrainingParameters$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CompletionTrainingParameters' from JSON`);
}
//# sourceMappingURL=completiontrainingparameters.js.map