@gensx/vercel-ai
Version:
Vercel AI SDK for GenSX.
24 lines (20 loc) • 721 B
JavaScript
/**
* Check out the docs at https://www.gensx.com/docs
* Find us on Github https://github.com/gensx-inc/gensx
* Find us on Discord https://discord.gg/F5BSU8Kc
*/
import * as z4 from 'zod/v4';
import { zodToJsonSchema } from 'zod-to-json-schema';
/**
* This file is a helper to provide basic functionality and properly support both Zod v3 and Zod v4.
* See https://zod.dev/library-authors for a reference.
*/
function toJsonSchema(schema) {
if ("_zod" in schema) {
return z4.toJSONSchema(schema);
}
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-explicit-any
return zodToJsonSchema(schema);
}
export { toJsonSchema };
//# sourceMappingURL=zod.js.map