import { evaluationInputSchema, type EvaluationInput, type EvaluationResult as BaseEvaluationResult, type GatewayEvaluationModelId } from "@automate.ax/api-contract/runtime"; import { createAnthropic } from "@ai-sdk/anthropic"; import { createGoogleGenerativeAI } from "@ai-sdk/google"; import { createOpenAI } from "@ai-sdk/openai"; import { type Experimental_EvaluationResult } from "ai"; import type { DistributedOmit } from "type-fest"; import { type ActionObjectInput } from "../../automation/actions.js"; import type { IntegrationAccountReference } from "../../automation/integrations.js"; import type { Signal } from "../../automation/signal-protocol.js"; declare const AI_EVALUATION_ACCOUNT_SERVICE_IDS: readonly ["anthropic", "google-genai", "openai", "vercel-ai-gateway"]; type AiEvaluationAccountServiceId = (typeof AI_EVALUATION_ACCOUNT_SERVICE_IDS)[number]; interface AiEvaluationModelIdsByService { anthropic: Parameters["evaluationModel"]>[0]; "google-genai": Parameters["evaluationModel"]>[0]; openai: Parameters["evaluationModel"]>[0]; "vercel-ai-gateway": GatewayEvaluationModelId; } /** Model IDs suggested for one evaluation provider, including new string IDs. */ export type EvaluateModelId = AiEvaluationModelIdsByService[TServiceId] | (string & {}); /** One Choice, Score, or Boolean question evaluated against shared state. */ export type EvaluateQuestion = EvaluationInput["questions"][string]; /** Named questions evaluated together against shared state. */ export type EvaluateQuestions = Record; /** Serializable evaluation result with question-dependent answer types. */ export type EvaluateResult = Omit & { /** One typed answer for every named question. */ answers: Experimental_EvaluationResult["answers"]; }; /** Inputs accepted by the built-in AI evaluation action. */ export type EvaluateOptions = DistributedOmit, "model" | "questions"> & { /** User-managed provider account. Omit to use the platform AI Gateway. */ account?: IntegrationAccountReference; /** Provider model ID. Defaults according to the selected account. */ model?: EvaluateModelId> | Exclude["model"], GatewayEvaluationModelId | undefined>; /** Static named questions whose keys and choices type the returned answers. */ questions: TQuestions; }; /** * Evaluates typed questions through the platform AI Gateway. * * @param options - Shared state, static questions, model, and evaluation * settings. */ export declare function evaluate(options: DistributedOmit, "account"> & { account?: never; }): Signal>; /** * Evaluates typed questions through an explicit provider account. * * @param options - Provider account, shared state, questions, and model * settings. */ export declare function evaluate(options: EvaluateOptions & { account: IntegrationAccountReference; }): Signal>; /** * Evaluates typed questions when the account may vary at authoring time. * * @param options - Shared state, static questions, account, and model settings. */ export declare function evaluate(options: EvaluateOptions): Signal>; export {}; //# sourceMappingURL=evaluate.d.ts.map