UNPKG

@arizeai/phoenix-client

Version:
23 lines 959 B
import type { ModelMessage, ToolChoice, ToolSet } from "ai" with { "resolution-mode": "import" }; import type { Variables, toSDKParamsBase } from "./types"; 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<PromptVariables extends Variables> = toSDKParamsBase<PromptVariables>; /** * 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: <PromptVariables extends Variables>({ prompt, variables, }: ToAIParams<PromptVariables>) => PartialAIParams | null; //# sourceMappingURL=toAI.d.ts.map