@arizeai/phoenix-client
Version:
A client for the Phoenix API
1,283 lines • 360 kB
TypeScript
export declare const openAIChatPartToAnthropic: import("zod").ZodEffects<import("zod").ZodDiscriminatedUnion<"type", [import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, import("zod").ZodObject<{
type: import("zod").ZodLiteral<"image_url">;
image_url: import("zod").ZodObject<{
url: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
url: string;
}, {
url: string;
}>;
}, "strip", import("zod").ZodTypeAny, {
type: "image_url";
image_url: {
url: string;
};
}, {
type: "image_url";
image_url: {
url: string;
};
}>]>, {
type: "text";
text: string;
source?: undefined;
} | {
type: "image";
source: {
data: string;
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
type: "base64";
};
text?: undefined;
} | null, {
text: string;
type: "text";
} | {
type: "image_url";
image_url: {
url: string;
};
}>;
/**
* Hub → Spoke: Convert an OpenAI message to Anthropic format
*/
export declare const openAIMessageToAnthropic: import("zod").ZodEffects<import("zod").ZodDiscriminatedUnion<"role", [import("zod").ZodObject<{
role: import("zod").ZodLiteral<"assistant">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
tool_call_id: import("zod").ZodOptional<import("zod").ZodString>;
tool_calls: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodEffects<import("zod").ZodOptional<import("zod").ZodLiteral<"function">>, "function", "function" | undefined>;
id: import("zod").ZodString;
function: import("zod").ZodObject<{
name: import("zod").ZodString;
arguments: import("zod").ZodString;
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
name: import("zod").ZodString;
arguments: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
name: import("zod").ZodString;
arguments: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough">>;
}, "strip", import("zod").ZodTypeAny, {
function: {
name: string;
arguments: string;
} & {
[k: string]: unknown;
};
type: "function";
id: string;
}, {
function: {
name: string;
arguments: string;
} & {
[k: string]: unknown;
};
id: string;
type?: "function" | undefined;
}>, "many">>;
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
role: import("zod").ZodLiteral<"assistant">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
tool_call_id: import("zod").ZodOptional<import("zod").ZodString>;
tool_calls: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodEffects<import("zod").ZodOptional<import("zod").ZodLiteral<"function">>, "function", "function" | undefined>;
id: import("zod").ZodString;
function: import("zod").ZodObject<{
name: import("zod").ZodString;
arguments: import("zod").ZodString;
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
name: import("zod").ZodString;
arguments: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
name: import("zod").ZodString;
arguments: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough">>;
}, "strip", import("zod").ZodTypeAny, {
function: {
name: string;
arguments: string;
} & {
[k: string]: unknown;
};
type: "function";
id: string;
}, {
function: {
name: string;
arguments: string;
} & {
[k: string]: unknown;
};
id: string;
type?: "function" | undefined;
}>, "many">>;
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
role: import("zod").ZodLiteral<"assistant">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
tool_call_id: import("zod").ZodOptional<import("zod").ZodString>;
tool_calls: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodEffects<import("zod").ZodOptional<import("zod").ZodLiteral<"function">>, "function", "function" | undefined>;
id: import("zod").ZodString;
function: import("zod").ZodObject<{
name: import("zod").ZodString;
arguments: import("zod").ZodString;
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
name: import("zod").ZodString;
arguments: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
name: import("zod").ZodString;
arguments: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough">>;
}, "strip", import("zod").ZodTypeAny, {
function: {
name: string;
arguments: string;
} & {
[k: string]: unknown;
};
type: "function";
id: string;
}, {
function: {
name: string;
arguments: string;
} & {
[k: string]: unknown;
};
id: string;
type?: "function" | undefined;
}>, "many">>;
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
role: import("zod").ZodLiteral<"tool">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
tool_call_id: import("zod").ZodString;
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
role: import("zod").ZodLiteral<"tool">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
tool_call_id: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
role: import("zod").ZodLiteral<"tool">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
tool_call_id: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
role: import("zod").ZodLiteral<"function">;
content: import("zod").ZodNullable<import("zod").ZodString>;
name: import("zod").ZodString;
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
role: import("zod").ZodLiteral<"function">;
content: import("zod").ZodNullable<import("zod").ZodString>;
name: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
role: import("zod").ZodLiteral<"function">;
content: import("zod").ZodNullable<import("zod").ZodString>;
name: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
role: import("zod").ZodLiteral<"user">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, import("zod").ZodObject<{
type: import("zod").ZodLiteral<"image_url">;
image_url: import("zod").ZodObject<{
url: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
url: string;
}, {
url: string;
}>;
}, "strip", import("zod").ZodTypeAny, {
type: "image_url";
image_url: {
url: string;
};
}, {
type: "image_url";
image_url: {
url: string;
};
}>]>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
role: import("zod").ZodLiteral<"user">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, import("zod").ZodObject<{
type: import("zod").ZodLiteral<"image_url">;
image_url: import("zod").ZodObject<{
url: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
url: string;
}, {
url: string;
}>;
}, "strip", import("zod").ZodTypeAny, {
type: "image_url";
image_url: {
url: string;
};
}, {
type: "image_url";
image_url: {
url: string;
};
}>]>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
role: import("zod").ZodLiteral<"user">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, import("zod").ZodObject<{
type: import("zod").ZodLiteral<"image_url">;
image_url: import("zod").ZodObject<{
url: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
url: string;
}, {
url: string;
}>;
}, "strip", import("zod").ZodTypeAny, {
type: "image_url";
image_url: {
url: string;
};
}, {
type: "image_url";
image_url: {
url: string;
};
}>]>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
role: import("zod").ZodLiteral<"system">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
role: import("zod").ZodLiteral<"system">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
role: import("zod").ZodLiteral<"system">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
role: import("zod").ZodLiteral<"developer">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
role: import("zod").ZodLiteral<"developer">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
role: import("zod").ZodLiteral<"developer">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
}, import("zod").ZodTypeAny, "passthrough">>]>, import("zod").objectOutputType<{
role: import("zod").ZodEnum<["user", "assistant"]>;
content: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodDiscriminatedUnion<"type", [import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, import("zod").ZodObject<{
type: import("zod").ZodLiteral<"image">;
source: import("zod").ZodObject<{
data: import("zod").ZodString;
media_type: import("zod").ZodEnum<["image/jpeg", "image/png", "image/gif", "image/webp"]>;
type: import("zod").ZodLiteral<"base64">;
}, "strip", import("zod").ZodTypeAny, {
type: "base64";
data: string;
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
}, {
type: "base64";
data: string;
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
}>;
}, "strip", import("zod").ZodTypeAny, {
type: "image";
source: {
type: "base64";
data: string;
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
};
}, {
type: "image";
source: {
type: "base64";
data: string;
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
};
}>, import("zod").ZodObject<{
id: import("zod").ZodString;
type: import("zod").ZodLiteral<"tool_use">;
name: import("zod").ZodString;
input: import("zod").ZodType<import("../../jsonLiteralSchema").JSONLiteral, import("zod").ZodTypeDef, import("../../jsonLiteralSchema").JSONLiteral>;
}, "strip", import("zod").ZodTypeAny, {
type: "tool_use";
name: string;
id: string;
input: import("../../jsonLiteralSchema").JSONLiteral;
}, {
type: "tool_use";
name: string;
id: string;
input: import("../../jsonLiteralSchema").JSONLiteral;
}>, import("zod").ZodObject<{
type: import("zod").ZodLiteral<"tool_result">;
tool_use_id: import("zod").ZodString;
content: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, import("zod").ZodObject<{
type: import("zod").ZodLiteral<"image">;
source: import("zod").ZodObject<{
data: import("zod").ZodString;
media_type: import("zod").ZodEnum<["image/jpeg", "image/png", "image/gif", "image/webp"]>;
type: import("zod").ZodLiteral<"base64">;
}, "strip", import("zod").ZodTypeAny, {
type: "base64";
data: string;
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
}, {
type: "base64";
data: string;
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
}>;
}, "strip", import("zod").ZodTypeAny, {
type: "image";
source: {
type: "base64";
data: string;
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
};
}, {
type: "image";
source: {
type: "base64";
data: string;
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
};
}>]>, "many">]>;
is_error: import("zod").ZodOptional<import("zod").ZodBoolean>;
}, "strip", import("zod").ZodTypeAny, {
type: "tool_result";
content: string | ({
text: string;
type: "text";
} | {
type: "image";
source: {
type: "base64";
data: string;
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
};
})[];
tool_use_id: string;
is_error?: boolean | undefined;
}, {
type: "tool_result";
content: string | ({
text: string;
type: "text";
} | {
type: "image";
source: {
type: "base64";
data: string;
media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
};
})[];
tool_use_id: string;
is_error?: boolean | undefined;
}>]>, "many">]>;
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
role: import("zod").ZodLiteral<"assistant">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
tool_call_id: import("zod").ZodOptional<import("zod").ZodString>;
tool_calls: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodEffects<import("zod").ZodOptional<import("zod").ZodLiteral<"function">>, "function", "function" | undefined>;
id: import("zod").ZodString;
function: import("zod").ZodObject<{
name: import("zod").ZodString;
arguments: import("zod").ZodString;
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
name: import("zod").ZodString;
arguments: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
name: import("zod").ZodString;
arguments: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough">>;
}, "strip", import("zod").ZodTypeAny, {
function: {
name: string;
arguments: string;
} & {
[k: string]: unknown;
};
type: "function";
id: string;
}, {
function: {
name: string;
arguments: string;
} & {
[k: string]: unknown;
};
id: string;
type?: "function" | undefined;
}>, "many">>;
}, import("zod").ZodTypeAny, "passthrough"> | import("zod").objectInputType<{
role: import("zod").ZodLiteral<"tool">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
tool_call_id: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough"> | import("zod").objectInputType<{
role: import("zod").ZodLiteral<"function">;
content: import("zod").ZodNullable<import("zod").ZodString>;
name: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough"> | import("zod").objectInputType<{
role: import("zod").ZodLiteral<"user">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, import("zod").ZodObject<{
type: import("zod").ZodLiteral<"image_url">;
image_url: import("zod").ZodObject<{
url: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
url: string;
}, {
url: string;
}>;
}, "strip", import("zod").ZodTypeAny, {
type: "image_url";
image_url: {
url: string;
};
}, {
type: "image_url";
image_url: {
url: string;
};
}>]>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
}, import("zod").ZodTypeAny, "passthrough"> | import("zod").objectInputType<{
role: import("zod").ZodLiteral<"system">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
}, import("zod").ZodTypeAny, "passthrough"> | import("zod").objectInputType<{
role: import("zod").ZodLiteral<"developer">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
}, import("zod").ZodTypeAny, "passthrough">>;
/**
* Hub → Spoke: Convert an OpenAI message to Prompt format
*/
export declare const openAIMessageToPhoenixPrompt: import("zod").ZodEffects<import("zod").ZodDiscriminatedUnion<"role", [import("zod").ZodObject<{
role: import("zod").ZodLiteral<"assistant">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
tool_call_id: import("zod").ZodOptional<import("zod").ZodString>;
tool_calls: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodEffects<import("zod").ZodOptional<import("zod").ZodLiteral<"function">>, "function", "function" | undefined>;
id: import("zod").ZodString;
function: import("zod").ZodObject<{
name: import("zod").ZodString;
arguments: import("zod").ZodString;
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
name: import("zod").ZodString;
arguments: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
name: import("zod").ZodString;
arguments: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough">>;
}, "strip", import("zod").ZodTypeAny, {
function: {
name: string;
arguments: string;
} & {
[k: string]: unknown;
};
type: "function";
id: string;
}, {
function: {
name: string;
arguments: string;
} & {
[k: string]: unknown;
};
id: string;
type?: "function" | undefined;
}>, "many">>;
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
role: import("zod").ZodLiteral<"assistant">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
tool_call_id: import("zod").ZodOptional<import("zod").ZodString>;
tool_calls: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodEffects<import("zod").ZodOptional<import("zod").ZodLiteral<"function">>, "function", "function" | undefined>;
id: import("zod").ZodString;
function: import("zod").ZodObject<{
name: import("zod").ZodString;
arguments: import("zod").ZodString;
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
name: import("zod").ZodString;
arguments: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
name: import("zod").ZodString;
arguments: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough">>;
}, "strip", import("zod").ZodTypeAny, {
function: {
name: string;
arguments: string;
} & {
[k: string]: unknown;
};
type: "function";
id: string;
}, {
function: {
name: string;
arguments: string;
} & {
[k: string]: unknown;
};
id: string;
type?: "function" | undefined;
}>, "many">>;
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
role: import("zod").ZodLiteral<"assistant">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
tool_call_id: import("zod").ZodOptional<import("zod").ZodString>;
tool_calls: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodEffects<import("zod").ZodOptional<import("zod").ZodLiteral<"function">>, "function", "function" | undefined>;
id: import("zod").ZodString;
function: import("zod").ZodObject<{
name: import("zod").ZodString;
arguments: import("zod").ZodString;
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
name: import("zod").ZodString;
arguments: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
name: import("zod").ZodString;
arguments: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough">>;
}, "strip", import("zod").ZodTypeAny, {
function: {
name: string;
arguments: string;
} & {
[k: string]: unknown;
};
type: "function";
id: string;
}, {
function: {
name: string;
arguments: string;
} & {
[k: string]: unknown;
};
id: string;
type?: "function" | undefined;
}>, "many">>;
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
role: import("zod").ZodLiteral<"tool">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
tool_call_id: import("zod").ZodString;
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
role: import("zod").ZodLiteral<"tool">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
tool_call_id: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
role: import("zod").ZodLiteral<"tool">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
tool_call_id: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
role: import("zod").ZodLiteral<"function">;
content: import("zod").ZodNullable<import("zod").ZodString>;
name: import("zod").ZodString;
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
role: import("zod").ZodLiteral<"function">;
content: import("zod").ZodNullable<import("zod").ZodString>;
name: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
role: import("zod").ZodLiteral<"function">;
content: import("zod").ZodNullable<import("zod").ZodString>;
name: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
role: import("zod").ZodLiteral<"user">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, import("zod").ZodObject<{
type: import("zod").ZodLiteral<"image_url">;
image_url: import("zod").ZodObject<{
url: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
url: string;
}, {
url: string;
}>;
}, "strip", import("zod").ZodTypeAny, {
type: "image_url";
image_url: {
url: string;
};
}, {
type: "image_url";
image_url: {
url: string;
};
}>]>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
role: import("zod").ZodLiteral<"user">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, import("zod").ZodObject<{
type: import("zod").ZodLiteral<"image_url">;
image_url: import("zod").ZodObject<{
url: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
url: string;
}, {
url: string;
}>;
}, "strip", import("zod").ZodTypeAny, {
type: "image_url";
image_url: {
url: string;
};
}, {
type: "image_url";
image_url: {
url: string;
};
}>]>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
role: import("zod").ZodLiteral<"user">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, import("zod").ZodObject<{
type: import("zod").ZodLiteral<"image_url">;
image_url: import("zod").ZodObject<{
url: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
url: string;
}, {
url: string;
}>;
}, "strip", import("zod").ZodTypeAny, {
type: "image_url";
image_url: {
url: string;
};
}, {
type: "image_url";
image_url: {
url: string;
};
}>]>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
role: import("zod").ZodLiteral<"system">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
role: import("zod").ZodLiteral<"system">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
role: import("zod").ZodLiteral<"system">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
role: import("zod").ZodLiteral<"developer">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
role: import("zod").ZodLiteral<"developer">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
role: import("zod").ZodLiteral<"developer">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
}, import("zod").ZodTypeAny, "passthrough">>]>, {
content: string | ({
text: string;
type: "text";
} | {
tool_call: {
type: "function";
name: string;
arguments: string;
};
type: "tool_call";
tool_call_id: string;
} | {
tool_result: string | number | boolean | unknown[] | Record<string, unknown> | null;
type: "tool_result";
tool_call_id: string;
})[];
role: "user" | "assistant" | "model" | "ai" | "tool" | "system" | "developer";
}, import("zod").objectInputType<{
role: import("zod").ZodLiteral<"assistant">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
tool_call_id: import("zod").ZodOptional<import("zod").ZodString>;
tool_calls: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodEffects<import("zod").ZodOptional<import("zod").ZodLiteral<"function">>, "function", "function" | undefined>;
id: import("zod").ZodString;
function: import("zod").ZodObject<{
name: import("zod").ZodString;
arguments: import("zod").ZodString;
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
name: import("zod").ZodString;
arguments: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
name: import("zod").ZodString;
arguments: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough">>;
}, "strip", import("zod").ZodTypeAny, {
function: {
name: string;
arguments: string;
} & {
[k: string]: unknown;
};
type: "function";
id: string;
}, {
function: {
name: string;
arguments: string;
} & {
[k: string]: unknown;
};
id: string;
type?: "function" | undefined;
}>, "many">>;
}, import("zod").ZodTypeAny, "passthrough"> | import("zod").objectInputType<{
role: import("zod").ZodLiteral<"tool">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
tool_call_id: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough"> | import("zod").objectInputType<{
role: import("zod").ZodLiteral<"function">;
content: import("zod").ZodNullable<import("zod").ZodString>;
name: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough"> | import("zod").objectInputType<{
role: import("zod").ZodLiteral<"user">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, import("zod").ZodObject<{
type: import("zod").ZodLiteral<"image_url">;
image_url: import("zod").ZodObject<{
url: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
url: string;
}, {
url: string;
}>;
}, "strip", import("zod").ZodTypeAny, {
type: "image_url";
image_url: {
url: string;
};
}, {
type: "image_url";
image_url: {
url: string;
};
}>]>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
}, import("zod").ZodTypeAny, "passthrough"> | import("zod").objectInputType<{
role: import("zod").ZodLiteral<"system">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
}, import("zod").ZodTypeAny, "passthrough"> | import("zod").objectInputType<{
role: import("zod").ZodLiteral<"developer">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
}, import("zod").ZodTypeAny, "passthrough">>;
/**
* Spoke → Hub: Convert a Prompt message to AI format
*/
export declare const openAIMessageToVercelAI: import("zod").ZodEffects<import("zod").ZodDiscriminatedUnion<"role", [import("zod").ZodObject<{
role: import("zod").ZodLiteral<"assistant">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
tool_call_id: import("zod").ZodOptional<import("zod").ZodString>;
tool_calls: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodEffects<import("zod").ZodOptional<import("zod").ZodLiteral<"function">>, "function", "function" | undefined>;
id: import("zod").ZodString;
function: import("zod").ZodObject<{
name: import("zod").ZodString;
arguments: import("zod").ZodString;
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
name: import("zod").ZodString;
arguments: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
name: import("zod").ZodString;
arguments: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough">>;
}, "strip", import("zod").ZodTypeAny, {
function: {
name: string;
arguments: string;
} & {
[k: string]: unknown;
};
type: "function";
id: string;
}, {
function: {
name: string;
arguments: string;
} & {
[k: string]: unknown;
};
id: string;
type?: "function" | undefined;
}>, "many">>;
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
role: import("zod").ZodLiteral<"assistant">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
tool_call_id: import("zod").ZodOptional<import("zod").ZodString>;
tool_calls: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodEffects<import("zod").ZodOptional<import("zod").ZodLiteral<"function">>, "function", "function" | undefined>;
id: import("zod").ZodString;
function: import("zod").ZodObject<{
name: import("zod").ZodString;
arguments: import("zod").ZodString;
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
name: import("zod").ZodString;
arguments: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
name: import("zod").ZodString;
arguments: import("zod").ZodString;
}, import("zod").ZodTypeAny, "passthrough">>;
}, "strip", import("zod").ZodTypeAny, {
function: {
name: string;
arguments: string;
} & {
[k: string]: unknown;
};
type: "function";
id: string;
}, {
function: {
name: string;
arguments: string;
} & {
[k: string]: unknown;
};
id: string;
type?: "function" | undefined;
}>, "many">>;
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
role: import("zod").ZodLiteral<"assistant">;
content: import("zod").ZodUnion<[import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodLiteral<"text">;
text: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, "many">, import("zod").ZodString]>;
name: import("zod").ZodOptional<import("zod").ZodString>;
tool_call_id: import("zod").ZodOptional<import("zod").ZodString>;
tool_calls: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
type: import("zod").ZodEffects<import("z