/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */

import * as z from "zod/v3";

/**
 * Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content.
 */
export type Prediction = {
  type?: "content" | undefined;
  content?: string | undefined;
};

/** @internal */
export type Prediction$Outbound = {
  type: "content";
  content: string;
};

/** @internal */
export const Prediction$outboundSchema: z.ZodType<
  Prediction$Outbound,
  z.ZodTypeDef,
  Prediction
> = z.object({
  type: z.literal("content").default("content" as const),
  content: z.string().default(""),
});

export function predictionToJSON(prediction: Prediction): string {
  return JSON.stringify(Prediction$outboundSchema.parse(prediction));
}
