/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: e5902853b31d
 */
import * as z from "zod/v4";
import { safeParse } from "../../lib/schemas.js";
import { CompletionResponseStreamChoice$inboundSchema, } from "./completionresponsestreamchoice.js";
import { UsageInfo$inboundSchema } from "./usageinfo.js";
/** @internal */
export const CompletionChunk$inboundSchema = z.object({
    id: z.string(),
    object: z.string().optional(),
    created: z.int().optional(),
    model: z.string(),
    usage: UsageInfo$inboundSchema.optional(),
    choices: z.array(CompletionResponseStreamChoice$inboundSchema),
});
export function completionChunkFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CompletionChunk$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CompletionChunk' from JSON`);
}
//# sourceMappingURL=completionchunk.js.map