/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 0a556e45c2c5
 */
import * as z from "zod/v4";
import { AssistantMessage$outboundSchema, } from "./assistantmessage.js";
import { SystemMessage$outboundSchema, } from "./systemmessage.js";
import { ToolMessage$outboundSchema, } from "./toolmessage.js";
import { UserMessage$outboundSchema, } from "./usermessage.js";
/** @internal */
export const InstructRequestMessage$outboundSchema = z.union([
    AssistantMessage$outboundSchema.and(z.object({ role: z.literal("assistant") })),
    SystemMessage$outboundSchema,
    ToolMessage$outboundSchema,
    UserMessage$outboundSchema,
]);
export function instructRequestMessageToJSON(instructRequestMessage) {
    return JSON.stringify(InstructRequestMessage$outboundSchema.parse(instructRequestMessage));
}
/** @internal */
export const InstructRequest$outboundSchema = z.object({
    messages: z.array(z.union([
        AssistantMessage$outboundSchema.and(z.object({ role: z.literal("assistant") })),
        SystemMessage$outboundSchema,
        ToolMessage$outboundSchema,
        UserMessage$outboundSchema,
    ])),
});
export function instructRequestToJSON(instructRequest) {
    return JSON.stringify(InstructRequest$outboundSchema.parse(instructRequest));
}
//# sourceMappingURL=instructrequest.js.map