@arizeai/phoenix-client
Version:
A client for the Phoenix API
22 lines • 847 B
TypeScript
import { toSDKParamsBase, Variables } from "./types";
import { type ModelMessage, type ToolChoice, type ToolSet } from "ai";
export type PartialAIParams = {
messages: ModelMessage[];
/**
The tools that the model can call. The model needs to support calling tools.
*/
tools?: ToolSet;
/**
The tool choice strategy. Default: 'auto'.
*/
toolChoice?: ToolChoice<ToolSet>;
};
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>) => PartialAIParams | null;
//# sourceMappingURL=toAI.d.ts.map