@naktibalda/jorel
Version:
The easiest way to use LLMs, including streams, images, documents, tools and various agent scenarios.
11 lines (10 loc) • 415 B
TypeScript
/**
* Fetches a file from the given URL and returns it as a buffer.
* @param url The URL to fetch the file from.
* @param fallbackMimeType Fallback MIME type to use if the response headers do not contain a MIME type.
* @returns The file as a buffer and its MIME type.
*/
export declare function fetchFileAsBuffer(url: string, fallbackMimeType?: string): Promise<{
buffer: Buffer;
mimeType: string;
}>;