@promptbook/azure-openai
Version:
Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action
45 lines (44 loc) • 1.54 kB
TypeScript
import { IDestroyable, Registration } from 'destroyable';
import type { string_mime_type } from '../../types/string_mime_type';
import type { string_url } from '../../types/string_url';
/**
* Converts Blob, File or MediaSource to url using URL.createObjectURL
*
* @public exported from `@promptbook/browser`
*/
export declare class ObjectUrl extends Registration implements IDestroyable {
readonly src: string_url;
private constructor();
/**
* Creates ObjectUrl from multiple input types
* Note: DO NOT forget to call destroy() when you are done with it
*/
static from(source: Blob | File | MediaSource | string, mimeType: string_mime_type): ObjectUrl;
/**
* Creates ObjectUrl from string
* Note: DO NOT forget to call destroy() when you are done with it
*/
static fromString(source: string, mimeType: string_mime_type): ObjectUrl;
/**
* Creates ObjectUrl
* DO NOT forget to call destroy() when you are done with it
*/
static fromBlob(source: Blob | File | MediaSource): ObjectUrl;
/**
* Creates ObjectUrl:
* 1) With functionality for Blobs, Files or MediaSources
* 2) Just a wrapper for string urls
*
* DO NOT forget to call destroy() when you are done with it
*/
static fromBlobOrUrl(source: Blob | File | MediaSource | URL | string_url): ObjectUrl;
/**
* Gets object url as string
* @alias src
*/
get href(): string_url;
/**
* Gets object url as URL object
*/
get url(): URL;
}