UNPKG

@arizeai/phoenix-client

Version:

A client for the Phoenix API

34 lines 1.3 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.anthropicToolCallsSchema = exports.anthropicToolCallSchema = void 0; exports.createAnthropicToolCall = createAnthropicToolCall; const jsonLiteralSchema_1 = require("../../jsonLiteralSchema"); const zod_1 = __importDefault(require("zod")); /** * The schema for an Anthropic tool call, this is what a message that calls a tool looks like */ exports.anthropicToolCallSchema = zod_1.default.object({ id: zod_1.default.string().describe("The ID of the tool call"), type: zod_1.default.literal("tool_use"), name: zod_1.default.string().describe("The name of the tool"), input: jsonLiteralSchema_1.jsonLiteralSchema.describe("The input for the tool"), }); /** * The zod schema for multiple Anthropic tool calls */ exports.anthropicToolCallsSchema = zod_1.default.array(exports.anthropicToolCallSchema); /** * Creates an empty Anthropic tool call with fields but no values filled in */ function createAnthropicToolCall() { return { id: "", type: "tool_use", name: "", input: {}, }; } //# sourceMappingURL=toolCallSchemas.js.map