/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { EmbeddingModel, EmbeddingModel$inboundSchema, EmbeddingModel$Outbound, EmbeddingModel$outboundSchema, } from "./embeddingmodel.js"; /** * Response containing available embedding models and their limits */ export type EmbeddingModelListResponse = { object?: "list" | undefined; /** * List of available embedding models with their limits */ data: Array; }; /** @internal */ export const EmbeddingModelListResponse$inboundSchema: z.ZodType< EmbeddingModelListResponse, z.ZodTypeDef, unknown > = z.object({ object: z.literal("list").default("list"), data: z.array(EmbeddingModel$inboundSchema), }); /** @internal */ export type EmbeddingModelListResponse$Outbound = { object: "list"; data: Array; }; /** @internal */ export const EmbeddingModelListResponse$outboundSchema: z.ZodType< EmbeddingModelListResponse$Outbound, z.ZodTypeDef, EmbeddingModelListResponse > = z.object({ object: z.literal("list").default("list" as const), data: z.array(EmbeddingModel$outboundSchema), }); export function embeddingModelListResponseToJSON( embeddingModelListResponse: EmbeddingModelListResponse, ): string { return JSON.stringify( EmbeddingModelListResponse$outboundSchema.parse(embeddingModelListResponse), ); } export function embeddingModelListResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => EmbeddingModelListResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EmbeddingModelListResponse' from JSON`, ); }