@llumiverse/drivers
Version:
LLM driver implementations. Currently supported are: openai, huggingface, bedrock, replicate.
23 lines • 1.39 kB
TypeScript
import { S3Client } from "@aws-sdk/client-s3";
import { Progress } from "@aws-sdk/lib-storage";
export declare function doesBucketExist(s3: S3Client, bucketName: string): Promise<boolean>;
export declare function createBucket(s3: S3Client, bucketName: string): Promise<import("@aws-sdk/client-s3").CreateBucketCommandOutput>;
export declare function tryCreateBucket(s3: S3Client, bucketName: string): Promise<import("@aws-sdk/client-s3").CreateBucketCommandOutput | undefined>;
export declare function uploadFile(s3: S3Client, source: ReadableStream, bucketName: string, file: string, onProgress?: (progress: Progress) => void): Promise<import("@aws-sdk/client-s3").CompleteMultipartUploadCommandOutput>;
/**
* Create the bucket if not already exists and then upload the file.
* @param s3
* @param source
* @param bucketName
* @param file
* @param onProgress
* @returns
*/
export declare function forceUploadFile(s3: S3Client, source: ReadableStream, bucketName: string, file: string, onProgress?: (progress: Progress) => void): Promise<import("@aws-sdk/client-s3").CompleteMultipartUploadCommandOutput>;
/**
* Parse an S3 HTTPS URL into an S3 URI format
* s3Url - The S3 HTTPS URL (e.g., https://bucket.s3.region.amazonaws.com/key)
* returns The S3 URI (e.g., s3://bucket/key)
*/
export declare function parseS3UrlToUri(s3Url: URL): string;
//# sourceMappingURL=s3.d.ts.map