UNPKG

@arizeai/phoenix-client

Version:

A client for the Phoenix API

20 lines 835 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.vercelAIToolDefinitionSchema = void 0; const zod_1 = require("zod"); /** * Vercel AI Tool Definition Schema * * Produces the same result as if you called `import { jsonSchema } from "ai"` * https://github.com/vercel/ai/blob/83976abfa99bf26f8227cf493386b8a6f0e71fdd/packages/ui-utils/src/schema.ts#L34 */ exports.vercelAIToolDefinitionSchema = zod_1.z.object({ type: zod_1.z.literal("function"), description: zod_1.z.string().optional(), inputSchema: zod_1.z.object({ _type: zod_1.z.unknown().optional().default(undefined), validate: zod_1.z.unknown().optional().default(undefined), jsonSchema: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional(), }), }); //# sourceMappingURL=toolSchemas.js.map