ai-functions
Version:
Core AI primitives for building intelligent applications
42 lines • 1.5 kB
TypeScript
/**
* AWS Bedrock Batch Inference Adapter
*
* Bedrock has a true batch inference API (S3-driven) and a runtime invoke API.
* The "batch" adapter here uses concurrent runtime invocations as a fallback
* (no S3 setup required); `createBedrockBatchJob` is exported separately for
* callers who want to drive the real S3-based batch flow directly.
*
* @see https://docs.aws.amazon.com/bedrock/latest/userguide/batch-inference.html
*
* @packageDocumentation
*/
import { type BatchAdapter, type BatchItem, type FlexAdapter } from './provider.js';
/** Configure AWS credentials and settings. */
export declare function configureAWSBedrock(options: {
region?: string;
accessKeyId?: string;
secretAccessKey?: string;
sessionToken?: string;
s3Bucket?: string;
roleArn?: string;
/** Optional: Cloudflare AI Gateway URL for routing requests */
gatewayUrl?: string;
/** Optional: Cloudflare AI Gateway token */
gatewayToken?: string;
}): void;
declare const bedrockAdapter: BatchAdapter;
/**
* Create and submit a true Bedrock batch inference job.
* Requires S3 bucket access and proper IAM setup.
*/
export declare function createBedrockBatchJob(items: BatchItem[], model: string, options: {
jobName: string;
s3InputPrefix?: string;
s3OutputPrefix?: string;
roleArn: string;
}): Promise<{
jobArn: string;
}>;
declare const bedrockFlexAdapter: FlexAdapter;
export { bedrockAdapter, bedrockFlexAdapter };
//# sourceMappingURL=bedrock.d.ts.map