"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.EvaluatorResponseLlm$inboundSchema = exports.Jury$inboundSchema = exports.TieValue$inboundSchema = exports.ReplacementJudges$inboundSchema = exports.EvaluatorResponseLlmFallbacks$inboundSchema = exports.EvaluatorResponseLlmRetry$inboundSchema = exports.Judges$inboundSchema = exports.Fallbacks$inboundSchema = exports.Retry$inboundSchema = exports.Mode$inboundSchema = exports.CategoricalLabels$inboundSchema = exports.TieValue = exports.Mode = void 0;
exports.categoricalLabelsFromJSON = categoricalLabelsFromJSON;
exports.retryFromJSON = retryFromJSON;
exports.fallbacksFromJSON = fallbacksFromJSON;
exports.judgesFromJSON = judgesFromJSON;
exports.evaluatorResponseLlmRetryFromJSON = evaluatorResponseLlmRetryFromJSON;
exports.evaluatorResponseLlmFallbacksFromJSON = evaluatorResponseLlmFallbacksFromJSON;
exports.replacementJudgesFromJSON = replacementJudgesFromJSON;
exports.juryFromJSON = juryFromJSON;
exports.evaluatorResponseLlmFromJSON = evaluatorResponseLlmFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
exports.Mode = {
    Single: "single",
    Jury: "jury",
};
exports.TieValue = {
    Tie: "Tie",
};
/** @internal */
exports.CategoricalLabels$inboundSchema = z.object({
    value: z.string(),
    description: z.string().optional(),
});
function categoricalLabelsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CategoricalLabels$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CategoricalLabels' from JSON`);
}
/** @internal */
exports.Mode$inboundSchema = z.nativeEnum(exports.Mode);
/** @internal */
exports.Retry$inboundSchema = z
    .object({
    count: z.number().int().default(2),
    on_codes: z.array(z.number().int()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "on_codes": "onCodes",
    });
});
function retryFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Retry$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Retry' from JSON`);
}
/** @internal */
exports.Fallbacks$inboundSchema = z.object({
    model: z.string(),
});
function fallbacksFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Fallbacks$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Fallbacks' from JSON`);
}
/** @internal */
exports.Judges$inboundSchema = z
    .object({
    model: z.string(),
    retry: z.lazy(() => exports.Retry$inboundSchema).optional(),
    fallbacks: z.array(z.lazy(() => exports.Fallbacks$inboundSchema)).optional(),
});
function judgesFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Judges$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Judges' from JSON`);
}
/** @internal */
exports.EvaluatorResponseLlmRetry$inboundSchema = z.object({
    count: z.number().int().default(2),
    on_codes: z.array(z.number().int()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "on_codes": "onCodes",
    });
});
function evaluatorResponseLlmRetryFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.EvaluatorResponseLlmRetry$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EvaluatorResponseLlmRetry' from JSON`);
}
/** @internal */
exports.EvaluatorResponseLlmFallbacks$inboundSchema = z.object({
    model: z.string(),
});
function evaluatorResponseLlmFallbacksFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.EvaluatorResponseLlmFallbacks$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EvaluatorResponseLlmFallbacks' from JSON`);
}
/** @internal */
exports.ReplacementJudges$inboundSchema = z.object({
    model: z.string(),
    retry: z.lazy(() => exports.EvaluatorResponseLlmRetry$inboundSchema).optional(),
    fallbacks: z.array(z.lazy(() => exports.EvaluatorResponseLlmFallbacks$inboundSchema))
        .optional(),
});
function replacementJudgesFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ReplacementJudges$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ReplacementJudges' from JSON`);
}
/** @internal */
exports.TieValue$inboundSchema = z
    .nativeEnum(exports.TieValue);
/** @internal */
exports.Jury$inboundSchema = z
    .object({
    judges: z.array(z.lazy(() => exports.Judges$inboundSchema)),
    replacement_judges: z.array(z.lazy(() => exports.ReplacementJudges$inboundSchema))
        .optional(),
    min_successful_judges: z.number().int().default(2),
    tie_value: exports.TieValue$inboundSchema.default("Tie"),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "replacement_judges": "replacementJudges",
        "min_successful_judges": "minSuccessfulJudges",
        "tie_value": "tieValue",
    });
});
function juryFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Jury$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Jury' from JSON`);
}
/** @internal */
exports.EvaluatorResponseLlm$inboundSchema = z.object({
    _id: z.string(),
    description: z.string(),
    created: z.string().default("2026-07-05T08:11:19.225Z"),
    updated: z.string().default("2026-07-05T08:11:19.225Z"),
    updated_by_id: z.nullable(z.string()).optional(),
    guardrail_config: z.any().optional(),
    type: z.literal("llm_eval"),
    repetitions: z.nullable(z.number().int()).optional(),
    prompt: z.string(),
    categories: z.nullable(z.array(z.string())).optional(),
    categorical_labels: z.nullable(z.array(z.lazy(() => exports.CategoricalLabels$inboundSchema))).optional(),
    dataset_id: z.string().optional(),
    key: z.string(),
    mode: exports.Mode$inboundSchema,
    model: z.string().optional(),
    jury: z.lazy(() => exports.Jury$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "_id": "id",
        "updated_by_id": "updatedById",
        "guardrail_config": "guardrailConfig",
        "categorical_labels": "categoricalLabels",
        "dataset_id": "datasetId",
    });
});
function evaluatorResponseLlmFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.EvaluatorResponseLlm$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EvaluatorResponseLlm' from JSON`);
}
//# sourceMappingURL=evaluatorresponsellm.js.map