UNPKG

@arizeai/phoenix-client

Version:

A client for the Phoenix API

28 lines 1.14 kB
import { Variables } from "../prompts/sdks/types.js"; import { PromptChatMessage, PromptTemplateFormat } from "../types/prompts.js"; /** * Format a list of prompt messages * * @param format - The format of the prompt message variables, e.g. MUSTACHE, F_STRING, NONE * @param promptMessages - The prompt messages to format * @param variables - The variables to use in the formatting * @returns The formatted prompt messages */ export declare function formatPromptMessages(format: PromptTemplateFormat, promptMessages: PromptChatMessage[], variables?: Variables): { content: string | ({ type: "text"; text: string; } | { type: "tool_call"; tool_call_id: string; tool_call: import("../__generated__/api/v1.js").components["schemas"]["ToolCallFunction"]; } | { type: "tool_result"; tool_call_id: string; tool_result: boolean | number | string | { [key: string]: unknown; } | unknown[] | null; })[]; role: "user" | "assistant" | "model" | "ai" | "tool" | "system" | "developer"; }[]; //# sourceMappingURL=formatPromptMessages.d.ts.map