/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: d4157cb371b7
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import { CompletionArgsStop$inboundSchema, CompletionArgsStop$outboundSchema, } from "./completionargsstop.js";
import { Prediction$inboundSchema, Prediction$outboundSchema, } from "./prediction.js";
import { ReasoningEffort$inboundSchema, ReasoningEffort$outboundSchema, } from "./reasoningeffort.js";
import { ResponseFormat$inboundSchema, ResponseFormat$outboundSchema, } from "./responseformat.js";
import { ToolChoiceEnum$inboundSchema, ToolChoiceEnum$outboundSchema, } from "./toolchoiceenum.js";
/** @internal */
export const CompletionArgs$inboundSchema = z.object({
    stop: z.nullable(CompletionArgsStop$inboundSchema).optional(),
    presence_penalty: z.nullable(z.number()).optional(),
    frequency_penalty: z.nullable(z.number()).optional(),
    temperature: z.nullable(z.number()).optional(),
    top_p: z.nullable(z.number()).optional(),
    max_tokens: z.nullable(z.int()).optional(),
    random_seed: z.nullable(z.int()).optional(),
    prediction: z.nullable(Prediction$inboundSchema).optional(),
    response_format: z.nullable(ResponseFormat$inboundSchema).optional(),
    tool_choice: ToolChoiceEnum$inboundSchema.optional(),
    reasoning_effort: z.nullable(ReasoningEffort$inboundSchema).optional(),
}).transform((v) => {
    return remap$(v, {
        "presence_penalty": "presencePenalty",
        "frequency_penalty": "frequencyPenalty",
        "top_p": "topP",
        "max_tokens": "maxTokens",
        "random_seed": "randomSeed",
        "response_format": "responseFormat",
        "tool_choice": "toolChoice",
        "reasoning_effort": "reasoningEffort",
    });
});
/** @internal */
export const CompletionArgs$outboundSchema = z.object({
    stop: z.nullable(CompletionArgsStop$outboundSchema).optional(),
    presencePenalty: z.nullable(z.number()).optional(),
    frequencyPenalty: z.nullable(z.number()).optional(),
    temperature: z.nullable(z.number()).optional(),
    topP: z.nullable(z.number()).optional(),
    maxTokens: z.nullable(z.int()).optional(),
    randomSeed: z.nullable(z.int()).optional(),
    prediction: z.nullable(Prediction$outboundSchema).optional(),
    responseFormat: z.nullable(ResponseFormat$outboundSchema).optional(),
    toolChoice: ToolChoiceEnum$outboundSchema.optional(),
    reasoningEffort: z.nullable(ReasoningEffort$outboundSchema).optional(),
}).transform((v) => {
    return remap$(v, {
        presencePenalty: "presence_penalty",
        frequencyPenalty: "frequency_penalty",
        topP: "top_p",
        maxTokens: "max_tokens",
        randomSeed: "random_seed",
        responseFormat: "response_format",
        toolChoice: "tool_choice",
        reasoningEffort: "reasoning_effort",
    });
});
export function completionArgsToJSON(completionArgs) {
    return JSON.stringify(CompletionArgs$outboundSchema.parse(completionArgs));
}
export function completionArgsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CompletionArgs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CompletionArgs' from JSON`);
}
//# sourceMappingURL=completionargs.js.map