@arizeai/phoenix-client
Version:
A client for the Phoenix API
38 lines • 1.3 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.anthropicToolDefinitionSchema = void 0;
exports.createAnthropicToolDefinition = createAnthropicToolDefinition;
const jsonSchema_1 = require("../../jsonSchema");
const zod_1 = __importDefault(require("zod"));
/**
* The zod schema for an anthropic tool definition
*/
exports.anthropicToolDefinitionSchema = zod_1.default.object({
name: zod_1.default.string(),
description: zod_1.default.string(),
input_schema: jsonSchema_1.jsonSchemaZodSchema,
});
/**
* Creates an Anthropic tool definition
* @param toolNumber the number of the tool in that instance for example instance.tools.length + 1 to be used to fill in the name
* @returns an Anthropic tool definition
*/
function createAnthropicToolDefinition(toolNumber) {
return {
name: `new_function_${toolNumber}`,
description: "",
input_schema: {
type: "object",
properties: {
new_arg: {
type: "string",
},
},
required: [],
},
};
}
//# sourceMappingURL=toolSchemas.js.map