import { AmplitudeOrAI } from "./types.js"; import { AmplitudeAIError } from "./exceptions.js"; import { Anthropic } from "./providers/anthropic.js"; import { OpenAI } from "./providers/openai.js"; import { AzureOpenAI } from "./providers/azure-openai.js"; import { Bedrock } from "./providers/bedrock.js"; import { Gemini } from "./providers/gemini.js"; import { GoogleGenAI } from "./providers/google-genai.js"; import { Mistral } from "./providers/mistral.js"; import * as openai0 from "openai"; import * as _anthropic_ai_sdk0 from "@anthropic-ai/sdk"; //#region src/wrappers.d.ts declare class AmplitudeAIWrapError extends AmplitudeAIError { constructor(message: string); } interface WrapOpts { propagateContext?: boolean; /** * Pass the provider SDK module directly to bypass `tryRequire`. * Required in bundler environments (Turbopack, Webpack, etc.) where * `createRequire` is unavailable. * * For OpenAI/Azure clients, pass the `openai` module default export. * For Anthropic clients, pass the `@anthropic-ai/sdk` module default export. */ providerModule?: unknown; [key: string]: unknown; } /** * Type-preserving overloads: when TypeScript can narrow the client type, * the return type is the corresponding instrumented wrapper. */ declare function wrap(client: InstanceType, amplitude: AmplitudeOrAI, opts?: WrapOpts): AzureOpenAI; declare function wrap(client: InstanceType, amplitude: AmplitudeOrAI, opts?: WrapOpts): OpenAI; declare function wrap(client: InstanceType, amplitude: AmplitudeOrAI, opts?: WrapOpts): Anthropic; declare function wrap(client: unknown, amplitude: AmplitudeOrAI, opts?: WrapOpts): OpenAI | AzureOpenAI | Anthropic | Gemini | GoogleGenAI | Bedrock | Mistral; //#endregion export { AmplitudeAIWrapError, wrap }; //# sourceMappingURL=wrappers.d.ts.map