@arizeai/phoenix-client
Version:
A client for the Phoenix API
196 lines • 6.37 kB
TypeScript
import z from "zod";
/**
*
* Prompt Message Schemas
*
*/
export declare const phoenixMessageRoleSchema: z.ZodEnum<["system", "developer", "user", "assistant", "model", "ai", "tool"]>;
export type PhoenixMessageRole = z.infer<typeof phoenixMessageRoleSchema>;
export declare const phoenixMessageSchema: z.ZodObject<{
role: z.ZodEnum<["system", "developer", "user", "assistant", "model", "ai", "tool"]>;
content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
type: z.ZodLiteral<"text">;
text: z.ZodString;
}, "strip", z.ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, z.ZodObject<{
type: z.ZodLiteral<"tool_call">;
tool_call_id: z.ZodString;
tool_call: z.ZodObject<{
type: z.ZodLiteral<"function">;
name: z.ZodString;
arguments: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "function";
name: string;
arguments: string;
}, {
type: "function";
name: string;
arguments: string;
}>;
}, "strip", z.ZodTypeAny, {
tool_call: {
type: "function";
name: string;
arguments: string;
};
type: "tool_call";
tool_call_id: string;
}, {
tool_call: {
type: "function";
name: string;
arguments: string;
};
type: "tool_call";
tool_call_id: string;
}>, z.ZodObject<{
type: z.ZodLiteral<"tool_result">;
tool_call_id: z.ZodString;
tool_result: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodUnknown, "many">]>;
}, "strip", z.ZodTypeAny, {
tool_result: string | number | boolean | unknown[] | Record<string, unknown> | null;
type: "tool_result";
tool_call_id: string;
}, {
tool_result: string | number | boolean | unknown[] | Record<string, unknown> | null;
type: "tool_result";
tool_call_id: string;
}>]>, "many">]>;
}, "strip", z.ZodTypeAny, {
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";
}, {
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";
}>;
export type PhoenixMessage = z.infer<typeof phoenixMessageSchema>;
export declare const phoenixMessagesSchema: z.ZodArray<z.ZodObject<{
role: z.ZodEnum<["system", "developer", "user", "assistant", "model", "ai", "tool"]>;
content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
type: z.ZodLiteral<"text">;
text: z.ZodString;
}, "strip", z.ZodTypeAny, {
text: string;
type: "text";
}, {
text: string;
type: "text";
}>, z.ZodObject<{
type: z.ZodLiteral<"tool_call">;
tool_call_id: z.ZodString;
tool_call: z.ZodObject<{
type: z.ZodLiteral<"function">;
name: z.ZodString;
arguments: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "function";
name: string;
arguments: string;
}, {
type: "function";
name: string;
arguments: string;
}>;
}, "strip", z.ZodTypeAny, {
tool_call: {
type: "function";
name: string;
arguments: string;
};
type: "tool_call";
tool_call_id: string;
}, {
tool_call: {
type: "function";
name: string;
arguments: string;
};
type: "tool_call";
tool_call_id: string;
}>, z.ZodObject<{
type: z.ZodLiteral<"tool_result">;
tool_call_id: z.ZodString;
tool_result: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodArray<z.ZodUnknown, "many">]>;
}, "strip", z.ZodTypeAny, {
tool_result: string | number | boolean | unknown[] | Record<string, unknown> | null;
type: "tool_result";
tool_call_id: string;
}, {
tool_result: string | number | boolean | unknown[] | Record<string, unknown> | null;
type: "tool_result";
tool_call_id: string;
}>]>, "many">]>;
}, "strip", z.ZodTypeAny, {
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";
}, {
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";
}>, "many">;
//# sourceMappingURL=messageSchemas.d.ts.map