/** * Anthropic SDK Wrapper for EthicalZen * * Wrap your Anthropic client to automatically route all calls through EthicalZen. * * @example * ```typescript * import Anthropic from '@anthropic-ai/sdk'; * import { protectAnthropic } from '@ethicalzen/sdk'; * * const anthropic = protectAnthropic( * new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY }), * 'your-ethicalzen-api-key' * ); * * // Use normally - all calls go through EthicalZen! * const response = await anthropic.messages.create({ * model: 'claude-3-opus-20240229', * max_tokens: 1024, * messages: [{ role: 'user', content: 'Hello' }] * }); * ``` */ import { EthicalZen, EthicalZenOptions } from '../ethicalzen'; /** * Options for Anthropic wrapper */ export interface AnthropicWrapperOptions extends EthicalZenOptions { /** Anthropic API key (if not already set in Anthropic client) */ anthropicApiKey?: string; } /** * Wrap an Anthropic client to route all calls through EthicalZen * * @param anthropicClient - Existing Anthropic client instance * @param ezApiKey - Your EthicalZen API key * @param options - Optional configuration * @returns Wrapped Anthropic client */ export declare function protectAnthropic(anthropicClient: T, ezApiKey: string, options?: AnthropicWrapperOptions): T; /** * Create a new protected Anthropic client from scratch * * @param anthropicApiKey - Your Anthropic API key * @param ezApiKey - Your EthicalZen API key * @param options - Optional configuration * @returns Object with common Anthropic methods * * @example * ```typescript * const claude = createProtectedAnthropic( * process.env.ANTHROPIC_API_KEY, * process.env.ETHICALZEN_API_KEY * ); * * const response = await claude.message({ * model: 'claude-3-opus-20240229', * max_tokens: 1024, * messages: [{ role: 'user', content: 'Hello' }] * }); * ``` */ export declare function createProtectedAnthropic(anthropicApiKey: string, ezApiKey: string, options?: EthicalZenOptions): { /** * Create a message (Claude 3+) */ message: (params: { model: string; max_tokens: number; messages: Array<{ role: string; content: string; }>; system?: string; temperature?: number; [key: string]: any; }) => Promise; /** * Create a completion (legacy Claude 2) */ complete: (params: { model: string; prompt: string; max_tokens_to_sample: number; [key: string]: any; }) => Promise; /** * Get the underlying EthicalZen instance */ getEthicalZen: () => EthicalZen; }; export default protectAnthropic; //# sourceMappingURL=anthropic.d.ts.map