ai-functions
Version:
Core AI primitives for building intelligent applications
25 lines • 891 B
TypeScript
/**
* Cloudflare AI Gateway Adapter
*
* Cloudflare's AI Gateway doesn't have a native batch API like OpenAI/Anthropic,
* so this adapter fakes batch processing via concurrent direct calls through
* the gateway and tracks state locally (`LocalJobStore` from `./provider.js`).
*
* For true async batch processing, consider Cloudflare Queues + Workers.
*
* @see https://developers.cloudflare.com/ai-gateway/
*
* @packageDocumentation
*/
import { type BatchAdapter } from './provider.js';
/** Configure the Cloudflare client. */
export declare function configureCloudflare(options: {
accountId?: string;
gatewayId?: string;
apiToken?: string;
/** Reserved for tests / custom hosts; the gateway URL itself is fixed. */
baseUrl?: string;
}): void;
declare const cloudflareAdapter: BatchAdapter;
export { cloudflareAdapter };
//# sourceMappingURL=cloudflare.d.ts.map