Variable anthropicToolDefinitionToOpenAIConst
anthropicToolDefinitionToOpenAI: ZodPipe<
ZodObject<
{
description: ZodString;
input_schema: ZodObject<
{
additionalProperties: ZodOptional<ZodBoolean>;
properties: ZodRecord<
ZodString,
ZodUnion<
readonly [
ZodObject<
{
description: ZodOptional<(...)>;
enum: ZodOptional<(...)>;
type: ZodEnum<(...)>;
},
$loose,
>,
ZodObject<{ anyOf: ZodArray<(...)> }, $strip>,
],
>,
>;
required: ZodOptional<ZodArray<ZodString>>;
type: ZodLiteral<"object">;
},
$loose,
>;
name: ZodString;
},
$strip,
>,
ZodTransform<
{
function: {
description?: string;
name: string;
parameters: {
additionalProperties?: boolean;
properties: Record<
string,
| {
description?: string;
enum?: string[];
type: | "string"
| "number"
| "boolean"
| "object"
| "null"
| "array"
| "integer";
[key: string]: unknown;
}
| {
anyOf: {
description?: (...)
| (...);
enum?: (...) | (...);
type: (...) | (...) | (...) | (...) | (...) | (...) | (...);
[key: string]: unknown;
}[];
},
>;
required?: string[];
strict?: boolean;
type: "object";
[key: string]: unknown;
};
[key: string]: unknown;
};
type: "function";
[key: string]: unknown;
},
{
description: string;
input_schema: {
additionalProperties?: boolean;
properties: Record<
string,
| {
description?: string;
enum?: string[];
type: | "string"
| "number"
| "boolean"
| "object"
| "null"
| "array"
| "integer";
[key: string]: unknown;
}
| {
anyOf: {
description?: string;
enum?: (...)[];
type:
| "string"
| "number"
| "boolean"
| "object"
| "null"
| "array"
| "integer";
[key: string]: unknown;
}[];
},
>;
required?: string[];
type: "object";
[key: string]: unknown;
};
name: string;
},
>,
> = ...
Parse incoming object as an Anthropic tool call and immediately convert to OpenAI format