ai-functions
Version:
A powerful TypeScript library for building AI-powered applications with template literals and structured outputs
11 lines • 473 B
TypeScript
import { z } from 'zod';
/**
* Creates a Zod schema from a template object where:
* - String values become descriptions
* - Pipe-separated values become enums
* - Word count constraints (e.g. "3-5 words") are enforced
*/
export declare function createSchemaFromTemplate<T extends Record<string, string>>(template: T): z.ZodObject<{
[K in keyof T]: z.ZodString | z.ZodEnum<[string, ...string[]]> | z.ZodEffects<z.ZodString>;
}>;
//# sourceMappingURL=schema.d.ts.map