/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type OllamaModel = { digest?: string | undefined; expiresAt?: string | undefined; family?: string | undefined; model?: string | undefined; name?: string | undefined; parentModel?: string | undefined; size?: number | undefined; sizeVram?: number | undefined; }; /** @internal */ export const OllamaModel$inboundSchema: z.ZodType< OllamaModel, z.ZodTypeDef, unknown > = z.object({ digest: z.string().optional(), expires_at: z.string().optional(), family: z.string().optional(), model: z.string().optional(), name: z.string().optional(), parent_model: z.string().optional(), size: z.number().int().optional(), size_vram: z.number().int().optional(), }).transform((v) => { return remap$(v, { "expires_at": "expiresAt", "parent_model": "parentModel", "size_vram": "sizeVram", }); }); export function ollamaModelFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => OllamaModel$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OllamaModel' from JSON`, ); }