"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.InvokeEvalResponseBody$inboundSchema = exports.String$inboundSchema = exports.ResponseBodyNumber$inboundSchema = exports.FormatOptions$inboundSchema = exports.FormatOptions1$inboundSchema = exports.FormatOptions2$inboundSchema = exports.Currency$inboundSchema = exports.FormatOptionsStyle$inboundSchema = exports.ResponseBodyBoolean$inboundSchema = exports.ResponseBodyValue$inboundSchema = exports.StringArray$inboundSchema = exports.RougeN$inboundSchema = exports.InvokeEvalResponseBodyValue$inboundSchema = exports.RougeL$inboundSchema = exports.Rouge2$inboundSchema = exports.Rouge1$inboundSchema = exports.BERTScore$inboundSchema = exports.InvokeEvalResponseBodyEvalsValue$inboundSchema = exports.InvokeEvalResponseBodyLLM$inboundSchema = exports.InvokeEvalResponseBodyEvalsResponseValue$inboundSchema = exports.ResponseBodyJury$inboundSchema = exports.Stats$inboundSchema = exports.Votes$inboundSchema = exports.InvokeEvalResponseBodyEvalsResponse200ApplicationJson7ValueValue$inboundSchema = exports.OriginalValue$inboundSchema = exports.InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$inboundSchema = exports.InvokeEvalResponseBodyHTTP$inboundSchema = exports.InvokeEvalResponseBodyEvalsResponse200Value$inboundSchema = exports.InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$inboundSchema = exports.Structured$inboundSchema = exports.InvokeEvalRequest$outboundSchema = exports.InvokeEvalRequestBody$outboundSchema = exports.Messages$outboundSchema = exports.ToolCalls$outboundSchema = exports.FunctionT$outboundSchema = exports.InvokeEvalType$outboundSchema = exports.Content$outboundSchema = exports.Two$outboundSchema = exports.One$outboundSchema = exports.Two2$outboundSchema = exports.ImageUrl$outboundSchema = exports.Three$outboundSchema = exports.FileT$outboundSchema = exports.Role$outboundSchema = exports.Currency = exports.FormatOptionsStyle = exports.InvokeEvalType = exports.Role = void 0;
exports.fileToJSON = fileToJSON;
exports.threeToJSON = threeToJSON;
exports.imageUrlToJSON = imageUrlToJSON;
exports.two2ToJSON = two2ToJSON;
exports.oneToJSON = oneToJSON;
exports.twoToJSON = twoToJSON;
exports.contentToJSON = contentToJSON;
exports.functionToJSON = functionToJSON;
exports.toolCallsToJSON = toolCallsToJSON;
exports.messagesToJSON = messagesToJSON;
exports.invokeEvalRequestBodyToJSON = invokeEvalRequestBodyToJSON;
exports.invokeEvalRequestToJSON = invokeEvalRequestToJSON;
exports.structuredFromJSON = structuredFromJSON;
exports.invokeEvalResponseBodyEvalsResponse200ApplicationJSONValueFromJSON = invokeEvalResponseBodyEvalsResponse200ApplicationJSONValueFromJSON;
exports.invokeEvalResponseBodyEvalsResponse200ValueFromJSON = invokeEvalResponseBodyEvalsResponse200ValueFromJSON;
exports.invokeEvalResponseBodyHTTPFromJSON = invokeEvalResponseBodyHTTPFromJSON;
exports.invokeEvalResponseBodyEvalsResponse200ApplicationJSON7ValueFromJSON = invokeEvalResponseBodyEvalsResponse200ApplicationJSON7ValueFromJSON;
exports.originalValueFromJSON = originalValueFromJSON;
exports.invokeEvalResponseBodyEvalsResponse200ApplicationJSON7ValueValueFromJSON = invokeEvalResponseBodyEvalsResponse200ApplicationJSON7ValueValueFromJSON;
exports.votesFromJSON = votesFromJSON;
exports.statsFromJSON = statsFromJSON;
exports.responseBodyJuryFromJSON = responseBodyJuryFromJSON;
exports.invokeEvalResponseBodyEvalsResponseValueFromJSON = invokeEvalResponseBodyEvalsResponseValueFromJSON;
exports.invokeEvalResponseBodyLLMFromJSON = invokeEvalResponseBodyLLMFromJSON;
exports.invokeEvalResponseBodyEvalsValueFromJSON = invokeEvalResponseBodyEvalsValueFromJSON;
exports.bertScoreFromJSON = bertScoreFromJSON;
exports.rouge1FromJSON = rouge1FromJSON;
exports.rouge2FromJSON = rouge2FromJSON;
exports.rougeLFromJSON = rougeLFromJSON;
exports.invokeEvalResponseBodyValueFromJSON = invokeEvalResponseBodyValueFromJSON;
exports.rougeNFromJSON = rougeNFromJSON;
exports.stringArrayFromJSON = stringArrayFromJSON;
exports.responseBodyValueFromJSON = responseBodyValueFromJSON;
exports.responseBodyBooleanFromJSON = responseBodyBooleanFromJSON;
exports.formatOptions2FromJSON = formatOptions2FromJSON;
exports.formatOptions1FromJSON = formatOptions1FromJSON;
exports.formatOptionsFromJSON = formatOptionsFromJSON;
exports.responseBodyNumberFromJSON = responseBodyNumberFromJSON;
exports.stringFromJSON = stringFromJSON;
exports.invokeEvalResponseBodyFromJSON = invokeEvalResponseBodyFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
/**
 * The role of the prompt message
 */
exports.Role = {
    System: "system",
    Developer: "developer",
    Assistant: "assistant",
    User: "user",
    Exception: "exception",
    Tool: "tool",
    Prompt: "prompt",
    Correction: "correction",
    ExpectedOutput: "expected_output",
};
exports.InvokeEvalType = {
    Function: "function",
};
exports.FormatOptionsStyle = {
    Currency: "currency",
};
exports.Currency = {
    Usd: "USD",
};
/** @internal */
exports.Role$outboundSchema = z.nativeEnum(exports.Role);
/** @internal */
exports.FileT$outboundSchema = z.object({
    fileData: z.string().optional(),
    uri: z.string().optional(),
    mimeType: z.string().optional(),
    filename: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        fileData: "file_data",
    });
});
function fileToJSON(fileT) {
    return JSON.stringify(exports.FileT$outboundSchema.parse(fileT));
}
/** @internal */
exports.Three$outboundSchema = z.object({
    type: z.literal("file"),
    file: z.lazy(() => exports.FileT$outboundSchema),
});
function threeToJSON(three) {
    return JSON.stringify(exports.Three$outboundSchema.parse(three));
}
/** @internal */
exports.ImageUrl$outboundSchema = z.object({
    url: z.string(),
    detail: z.string().optional(),
});
function imageUrlToJSON(imageUrl) {
    return JSON.stringify(exports.ImageUrl$outboundSchema.parse(imageUrl));
}
/** @internal */
exports.Two2$outboundSchema = z.object({
    type: z.literal("image_url"),
    imageUrl: z.lazy(() => exports.ImageUrl$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        imageUrl: "image_url",
    });
});
function two2ToJSON(two2) {
    return JSON.stringify(exports.Two2$outboundSchema.parse(two2));
}
/** @internal */
exports.One$outboundSchema = z
    .object({
    type: z.literal("text"),
    text: z.string(),
});
function oneToJSON(one) {
    return JSON.stringify(exports.One$outboundSchema.parse(one));
}
/** @internal */
exports.Two$outboundSchema = z
    .union([
    z.lazy(() => exports.One$outboundSchema),
    z.lazy(() => exports.Two2$outboundSchema),
    z.lazy(() => exports.Three$outboundSchema),
]);
function twoToJSON(two) {
    return JSON.stringify(exports.Two$outboundSchema.parse(two));
}
/** @internal */
exports.Content$outboundSchema = z.union([
    z.string(),
    z.array(z.union([
        z.lazy(() => exports.One$outboundSchema),
        z.lazy(() => exports.Two2$outboundSchema),
        z.lazy(() => exports.Three$outboundSchema),
    ])),
]);
function contentToJSON(content) {
    return JSON.stringify(exports.Content$outboundSchema.parse(content));
}
/** @internal */
exports.InvokeEvalType$outboundSchema = z.nativeEnum(exports.InvokeEvalType);
/** @internal */
exports.FunctionT$outboundSchema = z.object({
    name: z.string(),
    arguments: z.string(),
});
function functionToJSON(functionT) {
    return JSON.stringify(exports.FunctionT$outboundSchema.parse(functionT));
}
/** @internal */
exports.ToolCalls$outboundSchema = z.object({
    id: z.string().optional(),
    index: z.number().optional(),
    type: exports.InvokeEvalType$outboundSchema,
    function: z.lazy(() => exports.FunctionT$outboundSchema),
});
function toolCallsToJSON(toolCalls) {
    return JSON.stringify(exports.ToolCalls$outboundSchema.parse(toolCalls));
}
/** @internal */
exports.Messages$outboundSchema = z.object({
    role: exports.Role$outboundSchema,
    content: z.nullable(z.union([
        z.string(),
        z.array(z.union([
            z.lazy(() => exports.One$outboundSchema),
            z.lazy(() => exports.Two2$outboundSchema),
            z.lazy(() => exports.Three$outboundSchema),
        ])),
    ])),
    toolCalls: z.array(z.lazy(() => exports.ToolCalls$outboundSchema)).optional(),
    toolCallId: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        toolCalls: "tool_calls",
        toolCallId: "tool_call_id",
    });
});
function messagesToJSON(messages) {
    return JSON.stringify(exports.Messages$outboundSchema.parse(messages));
}
/** @internal */
exports.InvokeEvalRequestBody$outboundSchema = z.object({
    query: z.string().optional(),
    output: z.string().optional(),
    reference: z.string().optional(),
    retrievals: z.array(z.string()).optional(),
    messages: z.array(z.lazy(() => exports.Messages$outboundSchema)).optional(),
    model: z.string().optional(),
});
function invokeEvalRequestBodyToJSON(invokeEvalRequestBody) {
    return JSON.stringify(exports.InvokeEvalRequestBody$outboundSchema.parse(invokeEvalRequestBody));
}
/** @internal */
exports.InvokeEvalRequest$outboundSchema = z.object({
    id: z.string(),
    requestBody: z.lazy(() => exports.InvokeEvalRequestBody$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        requestBody: "RequestBody",
    });
});
function invokeEvalRequestToJSON(invokeEvalRequest) {
    return JSON.stringify(exports.InvokeEvalRequest$outboundSchema.parse(invokeEvalRequest));
}
/** @internal */
exports.Structured$inboundSchema = z.object({
    type: z.literal("structured"),
    value: z.record(z.any()),
});
function structuredFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Structured$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Structured' from JSON`);
}
/** @internal */
exports.InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$inboundSchema = z.union([z.number(), z.boolean()]);
function invokeEvalResponseBodyEvalsResponse200ApplicationJSONValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$inboundSchema
        .parse(JSON.parse(x)), `Failed to parse 'InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue' from JSON`);
}
/** @internal */
exports.InvokeEvalResponseBodyEvalsResponse200Value$inboundSchema = z.object({
    type: z.string(),
    value: z.union([z.number(), z.boolean()]),
});
function invokeEvalResponseBodyEvalsResponse200ValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.InvokeEvalResponseBodyEvalsResponse200Value$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InvokeEvalResponseBodyEvalsResponse200Value' from JSON`);
}
/** @internal */
exports.InvokeEvalResponseBodyHTTP$inboundSchema = z.object({
    type: z.literal("http_eval"),
    value: z.nullable(z.lazy(() => exports.InvokeEvalResponseBodyEvalsResponse200Value$inboundSchema)).optional(),
});
function invokeEvalResponseBodyHTTPFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.InvokeEvalResponseBodyHTTP$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InvokeEvalResponseBodyHTTP' from JSON`);
}
/** @internal */
exports.InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$inboundSchema = z.union([z.number(), z.boolean(), z.string()]);
function invokeEvalResponseBodyEvalsResponse200ApplicationJSON7ValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$inboundSchema
        .parse(JSON.parse(x)), `Failed to parse 'InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value' from JSON`);
}
/** @internal */
exports.OriginalValue$inboundSchema = z.union([z.number(), z.boolean(), z.string()]);
function originalValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.OriginalValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OriginalValue' from JSON`);
}
/** @internal */
exports.InvokeEvalResponseBodyEvalsResponse200ApplicationJson7ValueValue$inboundSchema = z.union([z.number(), z.boolean(), z.string()]);
function invokeEvalResponseBodyEvalsResponse200ApplicationJSON7ValueValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.InvokeEvalResponseBodyEvalsResponse200ApplicationJson7ValueValue$inboundSchema
        .parse(JSON.parse(x)), `Failed to parse 'InvokeEvalResponseBodyEvalsResponse200ApplicationJson7ValueValue' from JSON`);
}
/** @internal */
exports.Votes$inboundSchema = z
    .object({
    model: z.string(),
    replacement: z.boolean(),
    success: z.boolean(),
    value: z.union([z.number(), z.boolean(), z.string()]).optional(),
    explanation: z.string().optional(),
    error: z.string().optional(),
});
function votesFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Votes$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Votes' from JSON`);
}
/** @internal */
exports.Stats$inboundSchema = z
    .object({
    mean: z.number(),
    std: z.number(),
});
function statsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Stats$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Stats' from JSON`);
}
/** @internal */
exports.ResponseBodyJury$inboundSchema = z.object({
    judges_configured: z.number().int(),
    judges_succeeded: z.number().int(),
    judges_failed: z.number().int(),
    replacements_used: z.number().int(),
    tie: z.boolean(),
    votes: z.array(z.lazy(() => exports.Votes$inboundSchema)),
    stats: z.lazy(() => exports.Stats$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "judges_configured": "judgesConfigured",
        "judges_succeeded": "judgesSucceeded",
        "judges_failed": "judgesFailed",
        "replacements_used": "replacementsUsed",
    });
});
function responseBodyJuryFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseBodyJury$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyJury' from JSON`);
}
/** @internal */
exports.InvokeEvalResponseBodyEvalsResponseValue$inboundSchema = z.object({
    workflow_run_id: z.string().optional(),
    trace_id: z.string().optional(),
    value: z.nullable(z.union([z.number(), z.boolean(), z.string()])),
    explanation: z.nullable(z.string()).optional(),
    original_value: z.nullable(z.union([z.number(), z.boolean(), z.string()]))
        .optional(),
    original_explanation: z.nullable(z.string()).optional(),
    jury: z.lazy(() => exports.ResponseBodyJury$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "workflow_run_id": "workflowRunId",
        "trace_id": "traceId",
        "original_value": "originalValue",
        "original_explanation": "originalExplanation",
    });
});
function invokeEvalResponseBodyEvalsResponseValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.InvokeEvalResponseBodyEvalsResponseValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InvokeEvalResponseBodyEvalsResponseValue' from JSON`);
}
/** @internal */
exports.InvokeEvalResponseBodyLLM$inboundSchema = z.object({
    type: z.literal("llm_evaluator"),
    value: z.nullable(z.lazy(() => exports.InvokeEvalResponseBodyEvalsResponseValue$inboundSchema)),
});
function invokeEvalResponseBodyLLMFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.InvokeEvalResponseBodyLLM$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InvokeEvalResponseBodyLLM' from JSON`);
}
/** @internal */
exports.InvokeEvalResponseBodyEvalsValue$inboundSchema = z.object({
    f1: z.number(),
    precision: z.number(),
    recall: z.number(),
});
function invokeEvalResponseBodyEvalsValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.InvokeEvalResponseBodyEvalsValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InvokeEvalResponseBodyEvalsValue' from JSON`);
}
/** @internal */
exports.BERTScore$inboundSchema = z.object({
    type: z.literal("bert_score"),
    value: z.lazy(() => exports.InvokeEvalResponseBodyEvalsValue$inboundSchema),
});
function bertScoreFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.BERTScore$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BERTScore' from JSON`);
}
/** @internal */
exports.Rouge1$inboundSchema = z
    .object({
    f1: z.number(),
    precision: z.number(),
    recall: z.number(),
});
function rouge1FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Rouge1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Rouge1' from JSON`);
}
/** @internal */
exports.Rouge2$inboundSchema = z
    .object({
    f1: z.number(),
    precision: z.number(),
    recall: z.number(),
});
function rouge2FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Rouge2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Rouge2' from JSON`);
}
/** @internal */
exports.RougeL$inboundSchema = z
    .object({
    f1: z.number(),
    precision: z.number(),
    recall: z.number(),
});
function rougeLFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RougeL$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RougeL' from JSON`);
}
/** @internal */
exports.InvokeEvalResponseBodyValue$inboundSchema = z.object({
    rouge_1: z.lazy(() => exports.Rouge1$inboundSchema),
    rouge_2: z.lazy(() => exports.Rouge2$inboundSchema),
    rouge_l: z.lazy(() => exports.RougeL$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "rouge_1": "rouge1",
        "rouge_2": "rouge2",
        "rouge_l": "rougeL",
    });
});
function invokeEvalResponseBodyValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.InvokeEvalResponseBodyValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InvokeEvalResponseBodyValue' from JSON`);
}
/** @internal */
exports.RougeN$inboundSchema = z
    .object({
    type: z.literal("rouge_n"),
    value: z.lazy(() => exports.InvokeEvalResponseBodyValue$inboundSchema),
});
function rougeNFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RougeN$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RougeN' from JSON`);
}
/** @internal */
exports.StringArray$inboundSchema = z.object({
    type: z.literal("string_array"),
    values: z.array(z.nullable(z.string())),
});
function stringArrayFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.StringArray$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StringArray' from JSON`);
}
/** @internal */
exports.ResponseBodyValue$inboundSchema = z.union([z.boolean(), z.string(), z.number()]);
function responseBodyValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseBodyValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyValue' from JSON`);
}
/** @internal */
exports.ResponseBodyBoolean$inboundSchema = z.object({
    type: z.literal("boolean"),
    value: z.nullable(z.union([z.boolean(), z.string(), z.number()])),
});
function responseBodyBooleanFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseBodyBoolean$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyBoolean' from JSON`);
}
/** @internal */
exports.FormatOptionsStyle$inboundSchema = z.nativeEnum(exports.FormatOptionsStyle);
/** @internal */
exports.Currency$inboundSchema = z
    .nativeEnum(exports.Currency);
/** @internal */
exports.FormatOptions2$inboundSchema = z.object({
    style: exports.FormatOptionsStyle$inboundSchema,
    currency: exports.Currency$inboundSchema,
});
function formatOptions2FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.FormatOptions2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FormatOptions2' from JSON`);
}
/** @internal */
exports.FormatOptions1$inboundSchema = z.object({
    significant_digits: z.number(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "significant_digits": "significantDigits",
    });
});
function formatOptions1FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.FormatOptions1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FormatOptions1' from JSON`);
}
/** @internal */
exports.FormatOptions$inboundSchema = z.union([
    z.lazy(() => exports.FormatOptions2$inboundSchema),
    z.lazy(() => exports.FormatOptions1$inboundSchema),
]);
function formatOptionsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.FormatOptions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FormatOptions' from JSON`);
}
/** @internal */
exports.ResponseBodyNumber$inboundSchema = z.object({
    type: z.literal("number"),
    original_value: z.nullable(z.number()).optional(),
    value: z.nullable(z.number()),
    format_options: z.union([
        z.lazy(() => exports.FormatOptions2$inboundSchema),
        z.lazy(() => exports.FormatOptions1$inboundSchema),
    ]).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "original_value": "originalValue",
        "format_options": "formatOptions",
    });
});
function responseBodyNumberFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseBodyNumber$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyNumber' from JSON`);
}
/** @internal */
exports.String$inboundSchema = z
    .object({
    type: z.literal("string"),
    original_value: z.nullable(z.string()).optional(),
    value: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "original_value": "originalValue",
    });
});
function stringFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.String$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'String' from JSON`);
}
/** @internal */
exports.InvokeEvalResponseBody$inboundSchema = z.union([
    z.lazy(() => exports.String$inboundSchema),
    z.lazy(() => exports.ResponseBodyNumber$inboundSchema),
    z.lazy(() => exports.ResponseBodyBoolean$inboundSchema),
    z.lazy(() => exports.StringArray$inboundSchema),
    z.lazy(() => exports.RougeN$inboundSchema),
    z.lazy(() => exports.BERTScore$inboundSchema),
    z.lazy(() => exports.InvokeEvalResponseBodyLLM$inboundSchema),
    z.lazy(() => exports.InvokeEvalResponseBodyHTTP$inboundSchema),
    z.lazy(() => exports.Structured$inboundSchema),
]);
function invokeEvalResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.InvokeEvalResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InvokeEvalResponseBody' from JSON`);
}
//# sourceMappingURL=invokeeval.js.map