UNPKG

@arizeai/phoenix-client

Version:

A client for the Phoenix API

12 lines 682 B
import { Variables, toSDKParamsBase } from "./types"; import { type streamText, type generateText } from "ai"; export type PartialStreamTextParams = Omit<Parameters<typeof streamText>[0] | Parameters<typeof generateText>[0], "model">; export type ToAIParams<V extends Variables> = toSDKParamsBase<V>; /** * Converts a Phoenix prompt to Vercel AI sdk params. * * - note: To use response format, you must pass `prompt.response_format.json` to generateObject or streamObject * directly, through the `schema` argument. */ export declare const toAI: <V extends Variables>({ prompt, variables, }: ToAIParams<V>) => PartialStreamTextParams | null; //# sourceMappingURL=toAI.d.ts.map