CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes48downloads
client.js531 linesDownload Raw Back to openai
1"use strict";2// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.3var _OpenAI_instances, _a, _OpenAI_encoder, _OpenAI_baseURLOverridden;4Object.defineProperty(exports, "__esModule", { value: true });5exports.OpenAI = void 0;6const tslib_1 = require("./internal/tslib.js");7const uuid_1 = require("./internal/utils/uuid.js");8const values_1 = require("./internal/utils/values.js");9const sleep_1 = require("./internal/utils/sleep.js");10const errors_1 = require("./internal/errors.js");11const detect_platform_1 = require("./internal/detect-platform.js");12const Shims = tslib_1.__importStar(require("./internal/shims.js"));13const Opts = tslib_1.__importStar(require("./internal/request-options.js"));14const qs = tslib_1.__importStar(require("./internal/qs/index.js"));15const version_1 = require("./version.js");16const Errors = tslib_1.__importStar(require("./core/error.js"));17const Pagination = tslib_1.__importStar(require("./core/pagination.js"));18const Uploads = tslib_1.__importStar(require("./core/uploads.js"));19const API = tslib_1.__importStar(require("./resources/index.js"));20const api_promise_1 = require("./core/api-promise.js");21const batches_1 = require("./resources/batches.js");22const completions_1 = require("./resources/completions.js");23const embeddings_1 = require("./resources/embeddings.js");24const files_1 = require("./resources/files.js");25const images_1 = require("./resources/images.js");26const models_1 = require("./resources/models.js");27const moderations_1 = require("./resources/moderations.js");28const webhooks_1 = require("./resources/webhooks.js");29const audio_1 = require("./resources/audio/audio.js");30const beta_1 = require("./resources/beta/beta.js");31const chat_1 = require("./resources/chat/chat.js");32const containers_1 = require("./resources/containers/containers.js");33const evals_1 = require("./resources/evals/evals.js");34const fine_tuning_1 = require("./resources/fine-tuning/fine-tuning.js");35const graders_1 = require("./resources/graders/graders.js");36const responses_1 = require("./resources/responses/responses.js");37const uploads_1 = require("./resources/uploads/uploads.js");38const vector_stores_1 = require("./resources/vector-stores/vector-stores.js");39const detect_platform_2 = require("./internal/detect-platform.js");40const headers_1 = require("./internal/headers.js");41const env_1 = require("./internal/utils/env.js");42const log_1 = require("./internal/utils/log.js");43const values_2 = require("./internal/utils/values.js");44/**45 * API Client for interfacing with the OpenAI API.46 */47class OpenAI {48    /**49     * API Client for interfacing with the OpenAI API.50     *51     * @param {string | undefined} [opts.apiKey=process.env['OPENAI_API_KEY'] ?? undefined]52     * @param {string | null | undefined} [opts.organization=process.env['OPENAI_ORG_ID'] ?? null]53     * @param {string | null | undefined} [opts.project=process.env['OPENAI_PROJECT_ID'] ?? null]54     * @param {string | null | undefined} [opts.webhookSecret=process.env['OPENAI_WEBHOOK_SECRET'] ?? null]55     * @param {string} [opts.baseURL=process.env['OPENAI_BASE_URL'] ?? https://api.openai.com/v1] - Override the default base URL for the API.56     * @param {number} [opts.timeout=10 minutes] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.57     * @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.58     * @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.59     * @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.60     * @param {HeadersLike} opts.defaultHeaders - Default headers to include with every request to the API.61     * @param {Record<string, string | undefined>} opts.defaultQuery - Default query parameters to include with every request to the API.62     * @param {boolean} [opts.dangerouslyAllowBrowser=false] - By default, client-side use of this library is not allowed, as it risks exposing your secret API credentials to attackers.63     */64    constructor({ baseURL = (0, env_1.readEnv)('OPENAI_BASE_URL'), apiKey = (0, env_1.readEnv)('OPENAI_API_KEY'), organization = (0, env_1.readEnv)('OPENAI_ORG_ID') ?? null, project = (0, env_1.readEnv)('OPENAI_PROJECT_ID') ?? null, webhookSecret = (0, env_1.readEnv)('OPENAI_WEBHOOK_SECRET') ?? null, ...opts } = {}) {65        _OpenAI_instances.add(this);66        _OpenAI_encoder.set(this, void 0);67        this.completions = new API.Completions(this);68        this.chat = new API.Chat(this);69        this.embeddings = new API.Embeddings(this);70        this.files = new API.Files(this);71        this.images = new API.Images(this);72        this.audio = new API.Audio(this);73        this.moderations = new API.Moderations(this);74        this.models = new API.Models(this);75        this.fineTuning = new API.FineTuning(this);76        this.graders = new API.Graders(this);77        this.vectorStores = new API.VectorStores(this);78        this.webhooks = new API.Webhooks(this);79        this.beta = new API.Beta(this);80        this.batches = new API.Batches(this);81        this.uploads = new API.Uploads(this);82        this.responses = new API.Responses(this);83        this.evals = new API.Evals(this);84        this.containers = new API.Containers(this);85        if (apiKey === undefined) {86            throw new Errors.OpenAIError("The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'My API Key' }).");87        }88        const options = {89            apiKey,90            organization,91            project,92            webhookSecret,93            ...opts,94            baseURL: baseURL || `https://api.openai.com/v1`,95        };96        if (!options.dangerouslyAllowBrowser && (0, detect_platform_2.isRunningInBrowser)()) {97            throw new Errors.OpenAIError("It looks like you're running in a browser-like environment.\n\nThis is disabled by default, as it risks exposing your secret API credentials to attackers.\nIf you understand the risks and have appropriate mitigations in place,\nyou can set the `dangerouslyAllowBrowser` option to `true`, e.g.,\n\nnew OpenAI({ apiKey, dangerouslyAllowBrowser: true });\n\nhttps://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety\n");98        }99        this.baseURL = options.baseURL;100        this.timeout = options.timeout ?? _a.DEFAULT_TIMEOUT /* 10 minutes */;101        this.logger = options.logger ?? console;102        const defaultLogLevel = 'warn';103        // Set default logLevel early so that we can log a warning in parseLogLevel.104        this.logLevel = defaultLogLevel;105        this.logLevel =106            (0, log_1.parseLogLevel)(options.logLevel, 'ClientOptions.logLevel', this) ??107                (0, log_1.parseLogLevel)((0, env_1.readEnv)('OPENAI_LOG'), "process.env['OPENAI_LOG']", this) ??108                defaultLogLevel;109        this.fetchOptions = options.fetchOptions;110        this.maxRetries = options.maxRetries ?? 2;111        this.fetch = options.fetch ?? Shims.getDefaultFetch();112        tslib_1.__classPrivateFieldSet(this, _OpenAI_encoder, Opts.FallbackEncoder, "f");113        this._options = options;114        this.apiKey = apiKey;115        this.organization = organization;116        this.project = project;117        this.webhookSecret = webhookSecret;118    }119    /**120     * Create a new client instance re-using the same options given to the current client with optional overriding.121     */122    withOptions(options) {123        const client = new this.constructor({124            ...this._options,125            baseURL: this.baseURL,126            maxRetries: this.maxRetries,127            timeout: this.timeout,128            logger: this.logger,129            logLevel: this.logLevel,130            fetch: this.fetch,131            fetchOptions: this.fetchOptions,132            apiKey: this.apiKey,133            organization: this.organization,134            project: this.project,135            webhookSecret: this.webhookSecret,136            ...options,137        });138        return client;139    }140    defaultQuery() {141        return this._options.defaultQuery;142    }143    validateHeaders({ values, nulls }) {144        return;145    }146    async authHeaders(opts) {147        return (0, headers_1.buildHeaders)([{ Authorization: `Bearer ${this.apiKey}` }]);148    }149    stringifyQuery(query) {150        return qs.stringify(query, { arrayFormat: 'brackets' });151    }152    getUserAgent() {153        return `${this.constructor.name}/JS ${version_1.VERSION}`;154    }155    defaultIdempotencyKey() {156        return `stainless-node-retry-${(0, uuid_1.uuid4)()}`;157    }158    makeStatusError(status, error, message, headers) {159        return Errors.APIError.generate(status, error, message, headers);160    }161    buildURL(path, query, defaultBaseURL) {162        const baseURL = (!tslib_1.__classPrivateFieldGet(this, _OpenAI_instances, "m", _OpenAI_baseURLOverridden).call(this) && defaultBaseURL) || this.baseURL;163        const url = (0, values_1.isAbsoluteURL)(path) ?164            new URL(path)165            : new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));166        const defaultQuery = this.defaultQuery();167        if (!(0, values_2.isEmptyObj)(defaultQuery)) {168            query = { ...defaultQuery, ...query };169        }170        if (typeof query === 'object' && query && !Array.isArray(query)) {171            url.search = this.stringifyQuery(query);172        }173        return url.toString();174    }175    /**176     * Used as a callback for mutating the given `FinalRequestOptions` object.177     */178    async prepareOptions(options) { }179    /**180     * Used as a callback for mutating the given `RequestInit` object.181     *182     * This is useful for cases where you want to add certain headers based off of183     * the request properties, e.g. `method` or `url`.184     */185    async prepareRequest(request, { url, options }) { }186    get(path, opts) {187        return this.methodRequest('get', path, opts);188    }189    post(path, opts) {190        return this.methodRequest('post', path, opts);191    }192    patch(path, opts) {193        return this.methodRequest('patch', path, opts);194    }195    put(path, opts) {196        return this.methodRequest('put', path, opts);197    }198    delete(path, opts) {199        return this.methodRequest('delete', path, opts);200    }201    methodRequest(method, path, opts) {202        return this.request(Promise.resolve(opts).then((opts) => {203            return { method, path, ...opts };204        }));205    }206    request(options, remainingRetries = null) {207        return new api_promise_1.APIPromise(this, this.makeRequest(options, remainingRetries, undefined));208    }209    async makeRequest(optionsInput, retriesRemaining, retryOfRequestLogID) {210        const options = await optionsInput;211        const maxRetries = options.maxRetries ?? this.maxRetries;212        if (retriesRemaining == null) {213            retriesRemaining = maxRetries;214        }215        await this.prepareOptions(options);216        const { req, url, timeout } = await this.buildRequest(options, {217            retryCount: maxRetries - retriesRemaining,218        });219        await this.prepareRequest(req, { url, options });220        /** Not an API request ID, just for correlating local log entries. */221        const requestLogID = 'log_' + ((Math.random() * (1 << 24)) | 0).toString(16).padStart(6, '0');222        const retryLogStr = retryOfRequestLogID === undefined ? '' : `, retryOf: ${retryOfRequestLogID}`;223        const startTime = Date.now();224        (0, log_1.loggerFor)(this).debug(`[${requestLogID}] sending request`, (0, log_1.formatRequestDetails)({225            retryOfRequestLogID,226            method: options.method,227            url,228            options,229            headers: req.headers,230        }));231        if (options.signal?.aborted) {232            throw new Errors.APIUserAbortError();233        }234        const controller = new AbortController();235        const response = await this.fetchWithTimeout(url, req, timeout, controller).catch(errors_1.castToError);236        const headersTime = Date.now();237        if (response instanceof Error) {238            const retryMessage = `retrying, ${retriesRemaining} attempts remaining`;239            if (options.signal?.aborted) {240                throw new Errors.APIUserAbortError();241            }242            // detect native connection timeout errors243            // deno throws "TypeError: error sending request for url (https://example/): client error (Connect): tcp connect error: Operation timed out (os error 60): Operation timed out (os error 60)"244            // undici throws "TypeError: fetch failed" with cause "ConnectTimeoutError: Connect Timeout Error (attempted address: example:443, timeout: 1ms)"245            // others do not provide enough information to distinguish timeouts from other connection errors246            const isTimeout = (0, errors_1.isAbortError)(response) ||247                /timed? ?out/i.test(String(response) + ('cause' in response ? String(response.cause) : ''));248            if (retriesRemaining) {249                (0, log_1.loggerFor)(this).info(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - ${retryMessage}`);250                (0, log_1.loggerFor)(this).debug(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (${retryMessage})`, (0, log_1.formatRequestDetails)({251                    retryOfRequestLogID,252                    url,253                    durationMs: headersTime - startTime,254                    message: response.message,255                }));256                return this.retryRequest(options, retriesRemaining, retryOfRequestLogID ?? requestLogID);257            }258            (0, log_1.loggerFor)(this).info(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - error; no more retries left`);259            (0, log_1.loggerFor)(this).debug(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (error; no more retries left)`, (0, log_1.formatRequestDetails)({260                retryOfRequestLogID,261                url,262                durationMs: headersTime - startTime,263                message: response.message,264            }));265            if (isTimeout) {266                throw new Errors.APIConnectionTimeoutError();267            }268            throw new Errors.APIConnectionError({ cause: response });269        }270        const specialHeaders = [...response.headers.entries()]271            .filter(([name]) => name === 'x-request-id')272            .map(([name, value]) => ', ' + name + ': ' + JSON.stringify(value))273            .join('');274        const responseInfo = `[${requestLogID}${retryLogStr}${specialHeaders}] ${req.method} ${url} ${response.ok ? 'succeeded' : 'failed'} with status ${response.status} in ${headersTime - startTime}ms`;275        if (!response.ok) {276            const shouldRetry = await this.shouldRetry(response);277            if (retriesRemaining && shouldRetry) {278                const retryMessage = `retrying, ${retriesRemaining} attempts remaining`;279                // We don't need the body of this response.280                await Shims.CancelReadableStream(response.body);281                (0, log_1.loggerFor)(this).info(`${responseInfo} - ${retryMessage}`);282                (0, log_1.loggerFor)(this).debug(`[${requestLogID}] response error (${retryMessage})`, (0, log_1.formatRequestDetails)({283                    retryOfRequestLogID,284                    url: response.url,285                    status: response.status,286                    headers: response.headers,287                    durationMs: headersTime - startTime,288                }));289                return this.retryRequest(options, retriesRemaining, retryOfRequestLogID ?? requestLogID, response.headers);290            }291            const retryMessage = shouldRetry ? `error; no more retries left` : `error; not retryable`;292            (0, log_1.loggerFor)(this).info(`${responseInfo} - ${retryMessage}`);293            const errText = await response.text().catch((err) => (0, errors_1.castToError)(err).message);294            const errJSON = (0, values_1.safeJSON)(errText);295            const errMessage = errJSON ? undefined : errText;296            (0, log_1.loggerFor)(this).debug(`[${requestLogID}] response error (${retryMessage})`, (0, log_1.formatRequestDetails)({297                retryOfRequestLogID,298                url: response.url,299                status: response.status,300                headers: response.headers,301                message: errMessage,302                durationMs: Date.now() - startTime,303            }));304            const err = this.makeStatusError(response.status, errJSON, errMessage, response.headers);305            throw err;306        }307        (0, log_1.loggerFor)(this).info(responseInfo);308        (0, log_1.loggerFor)(this).debug(`[${requestLogID}] response start`, (0, log_1.formatRequestDetails)({309            retryOfRequestLogID,310            url: response.url,311            status: response.status,312            headers: response.headers,313            durationMs: headersTime - startTime,314        }));315        return { response, options, controller, requestLogID, retryOfRequestLogID, startTime };316    }317    getAPIList(path, Page, opts) {318        return this.requestAPIList(Page, { method: 'get', path, ...opts });319    }320    requestAPIList(Page, options) {321        const request = this.makeRequest(options, null, undefined);322        return new Pagination.PagePromise(this, request, Page);323    }324    async fetchWithTimeout(url, init, ms, controller) {325        const { signal, method, ...options } = init || {};326        if (signal)327            signal.addEventListener('abort', () => controller.abort());328        const timeout = setTimeout(() => controller.abort(), ms);329        const isReadableBody = (globalThis.ReadableStream && options.body instanceof globalThis.ReadableStream) ||330            (typeof options.body === 'object' && options.body !== null && Symbol.asyncIterator in options.body);331        const fetchOptions = {332            signal: controller.signal,333            ...(isReadableBody ? { duplex: 'half' } : {}),334            method: 'GET',335            ...options,336        };337        if (method) {338            // Custom methods like 'patch' need to be uppercased339            // See https://github.com/nodejs/undici/issues/2294340            fetchOptions.method = method.toUpperCase();341        }342        try {343            // use undefined this binding; fetch errors if bound to something else in browser/cloudflare344            return await this.fetch.call(undefined, url, fetchOptions);345        }346        finally {347            clearTimeout(timeout);348        }349    }350    async shouldRetry(response) {351        // Note this is not a standard header.352        const shouldRetryHeader = response.headers.get('x-should-retry');353        // If the server explicitly says whether or not to retry, obey.354        if (shouldRetryHeader === 'true')355            return true;356        if (shouldRetryHeader === 'false')357            return false;358        // Retry on request timeouts.359        if (response.status === 408)360            return true;361        // Retry on lock timeouts.362        if (response.status === 409)363            return true;364        // Retry on rate limits.365        if (response.status === 429)366            return true;367        // Retry internal errors.368        if (response.status >= 500)369            return true;370        return false;371    }372    async retryRequest(options, retriesRemaining, requestLogID, responseHeaders) {373        let timeoutMillis;374        // Note the `retry-after-ms` header may not be standard, but is a good idea and we'd like proactive support for it.375        const retryAfterMillisHeader = responseHeaders?.get('retry-after-ms');376        if (retryAfterMillisHeader) {377            const timeoutMs = parseFloat(retryAfterMillisHeader);378            if (!Number.isNaN(timeoutMs)) {379                timeoutMillis = timeoutMs;380            }381        }382        // About the Retry-After header: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After383        const retryAfterHeader = responseHeaders?.get('retry-after');384        if (retryAfterHeader && !timeoutMillis) {385            const timeoutSeconds = parseFloat(retryAfterHeader);386            if (!Number.isNaN(timeoutSeconds)) {387                timeoutMillis = timeoutSeconds * 1000;388            }389            else {390                timeoutMillis = Date.parse(retryAfterHeader) - Date.now();391            }392        }393        // If the API asks us to wait a certain amount of time (and it's a reasonable amount),394        // just do what it says, but otherwise calculate a default395        if (!(timeoutMillis && 0 <= timeoutMillis && timeoutMillis < 60 * 1000)) {396            const maxRetries = options.maxRetries ?? this.maxRetries;397            timeoutMillis = this.calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries);398        }399        await (0, sleep_1.sleep)(timeoutMillis);400        return this.makeRequest(options, retriesRemaining - 1, requestLogID);401    }402    calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries) {403        const initialRetryDelay = 0.5;404        const maxRetryDelay = 8.0;405        const numRetries = maxRetries - retriesRemaining;406        // Apply exponential backoff, but not more than the max.407        const sleepSeconds = Math.min(initialRetryDelay * Math.pow(2, numRetries), maxRetryDelay);408        // Apply some jitter, take up to at most 25 percent of the retry time.409        const jitter = 1 - Math.random() * 0.25;410        return sleepSeconds * jitter * 1000;411    }412    async buildRequest(inputOptions, { retryCount = 0 } = {}) {413        const options = { ...inputOptions };414        const { method, path, query, defaultBaseURL } = options;415        const url = this.buildURL(path, query, defaultBaseURL);416        if ('timeout' in options)417            (0, values_1.validatePositiveInteger)('timeout', options.timeout);418        options.timeout = options.timeout ?? this.timeout;419        const { bodyHeaders, body } = this.buildBody({ options });420        const reqHeaders = await this.buildHeaders({ options: inputOptions, method, bodyHeaders, retryCount });421        const req = {422            method,423            headers: reqHeaders,424            ...(options.signal && { signal: options.signal }),425            ...(globalThis.ReadableStream &&426                body instanceof globalThis.ReadableStream && { duplex: 'half' }),427            ...(body && { body }),428            ...(this.fetchOptions ?? {}),429            ...(options.fetchOptions ?? {}),430        };431        return { req, url, timeout: options.timeout };432    }433    async buildHeaders({ options, method, bodyHeaders, retryCount, }) {434        let idempotencyHeaders = {};435        if (this.idempotencyHeader && method !== 'get') {436            if (!options.idempotencyKey)437                options.idempotencyKey = this.defaultIdempotencyKey();438            idempotencyHeaders[this.idempotencyHeader] = options.idempotencyKey;439        }440        const headers = (0, headers_1.buildHeaders)([441            idempotencyHeaders,442            {443                Accept: 'application/json',444                'User-Agent': this.getUserAgent(),445                'X-Stainless-Retry-Count': String(retryCount),446                ...(options.timeout ? { 'X-Stainless-Timeout': String(Math.trunc(options.timeout / 1000)) } : {}),447                ...(0, detect_platform_1.getPlatformHeaders)(),448                'OpenAI-Organization': this.organization,449                'OpenAI-Project': this.project,450            },451            await this.authHeaders(options),452            this._options.defaultHeaders,453            bodyHeaders,454            options.headers,455        ]);456        this.validateHeaders(headers);457        return headers.values;458    }459    buildBody({ options: { body, headers: rawHeaders } }) {460        if (!body) {461            return { bodyHeaders: undefined, body: undefined };462        }463        const headers = (0, headers_1.buildHeaders)([rawHeaders]);464        if (465        // Pass raw type verbatim466        ArrayBuffer.isView(body) ||467            body instanceof ArrayBuffer ||468            body instanceof DataView ||469            (typeof body === 'string' &&470                // Preserve legacy string encoding behavior for now471                headers.values.has('content-type')) ||472            // `Blob` is superset of `File`473            body instanceof Blob ||474            // `FormData` -> `multipart/form-data`475            body instanceof FormData ||476            // `URLSearchParams` -> `application/x-www-form-urlencoded`477            body instanceof URLSearchParams ||478            // Send chunked stream (each chunk has own `length`)479            (globalThis.ReadableStream && body instanceof globalThis.ReadableStream)) {480            return { bodyHeaders: undefined, body: body };481        }482        else if (typeof body === 'object' &&483            (Symbol.asyncIterator in body ||484                (Symbol.iterator in body && 'next' in body && typeof body.next === 'function'))) {485            return { bodyHeaders: undefined, body: Shims.ReadableStreamFrom(body) };486        }487        else {488            return tslib_1.__classPrivateFieldGet(this, _OpenAI_encoder, "f").call(this, { body, headers });489        }490    }491}492exports.OpenAI = OpenAI;493_a = OpenAI, _OpenAI_encoder = new WeakMap(), _OpenAI_instances = new WeakSet(), _OpenAI_baseURLOverridden = function _OpenAI_baseURLOverridden() {494    return this.baseURL !== 'https://api.openai.com/v1';495};496OpenAI.OpenAI = _a;497OpenAI.DEFAULT_TIMEOUT = 600000; // 10 minutes498OpenAI.OpenAIError = Errors.OpenAIError;499OpenAI.APIError = Errors.APIError;500OpenAI.APIConnectionError = Errors.APIConnectionError;501OpenAI.APIConnectionTimeoutError = Errors.APIConnectionTimeoutError;502OpenAI.APIUserAbortError = Errors.APIUserAbortError;503OpenAI.NotFoundError = Errors.NotFoundError;504OpenAI.ConflictError = Errors.ConflictError;505OpenAI.RateLimitError = Errors.RateLimitError;506OpenAI.BadRequestError = Errors.BadRequestError;507OpenAI.AuthenticationError = Errors.AuthenticationError;508OpenAI.InternalServerError = Errors.InternalServerError;509OpenAI.PermissionDeniedError = Errors.PermissionDeniedError;510OpenAI.UnprocessableEntityError = Errors.UnprocessableEntityError;511OpenAI.InvalidWebhookSignatureError = Errors.InvalidWebhookSignatureError;512OpenAI.toFile = Uploads.toFile;513OpenAI.Completions = completions_1.Completions;514OpenAI.Chat = chat_1.Chat;515OpenAI.Embeddings = embeddings_1.Embeddings;516OpenAI.Files = files_1.Files;517OpenAI.Images = images_1.Images;518OpenAI.Audio = audio_1.Audio;519OpenAI.Moderations = moderations_1.Moderations;520OpenAI.Models = models_1.Models;521OpenAI.FineTuning = fine_tuning_1.FineTuning;522OpenAI.Graders = graders_1.Graders;523OpenAI.VectorStores = vector_stores_1.VectorStores;524OpenAI.Webhooks = webhooks_1.Webhooks;525OpenAI.Beta = beta_1.Beta;526OpenAI.Batches = batches_1.Batches;527OpenAI.Uploads = uploads_1.Uploads;528OpenAI.Responses = responses_1.Responses;529OpenAI.Evals = evals_1.Evals;530OpenAI.Containers = containers_1.Containers;531//# sourceMappingURL=client.js.map
basant307/AI_Governance_Project · CoolFace