/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 91e8cb19f799 */ import * as z from "zod/v3"; /** * Metadata about the response (e.g., latency, token count). */ export type ResponseMetadata = { /** * Time taken to generate the response in milliseconds. */ latencyMs?: number | undefined; /** * Number of tokens in the response. */ tokenCount?: number | undefined; /** * The specific model version used. */ modelUsed?: string | undefined; }; export type SideBySideImplementation = { /** * Unique identifier for this implementation variant. */ implementationId?: string | undefined; /** * Human-readable name for this implementation (e.g., "Variant A", "GPT-4", "Claude"). */ implementationName?: string | undefined; /** * The search/chat parameters used for this implementation. */ searchParams?: { [k: string]: string } | undefined; /** * The full response generated by this implementation. */ response?: string | undefined; /** * Metadata about the response (e.g., latency, token count). */ responseMetadata?: ResponseMetadata | undefined; }; /** @internal */ export type ResponseMetadata$Outbound = { latencyMs?: number | undefined; tokenCount?: number | undefined; modelUsed?: string | undefined; }; /** @internal */ export const ResponseMetadata$outboundSchema: z.ZodType< ResponseMetadata$Outbound, z.ZodTypeDef, ResponseMetadata > = z.object({ latencyMs: z.number().int().optional(), tokenCount: z.number().int().optional(), modelUsed: z.string().optional(), }); export function responseMetadataToJSON( responseMetadata: ResponseMetadata, ): string { return JSON.stringify( ResponseMetadata$outboundSchema.parse(responseMetadata), ); } /** @internal */ export type SideBySideImplementation$Outbound = { implementationId?: string | undefined; implementationName?: string | undefined; searchParams?: { [k: string]: string } | undefined; response?: string | undefined; responseMetadata?: ResponseMetadata$Outbound | undefined; }; /** @internal */ export const SideBySideImplementation$outboundSchema: z.ZodType< SideBySideImplementation$Outbound, z.ZodTypeDef, SideBySideImplementation > = z.object({ implementationId: z.string().optional(), implementationName: z.string().optional(), searchParams: z.record(z.string()).optional(), response: z.string().optional(), responseMetadata: z.lazy(() => ResponseMetadata$outboundSchema).optional(), }); export function sideBySideImplementationToJSON( sideBySideImplementation: SideBySideImplementation, ): string { return JSON.stringify( SideBySideImplementation$outboundSchema.parse(sideBySideImplementation), ); }