UNPKG

@arizeai/phoenix-client

Version:
22 lines 869 B
import type { ModelMessage, ToolChoice, ToolSet } from "ai"; import type { Variables, toSDKParamsBase } from "./types.js"; 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_schema.schema` to generateObject or streamObject * via `jsonSchema()`, through the `schema` argument. */ export declare const toAI: <V extends Variables>({ prompt, variables, }: ToAIParams<V>) => PartialAIParams | null; //# sourceMappingURL=toAI.d.ts.map