commit
This commit is contained in:
parent
b9e306320c
commit
943ecc44c1
79 changed files with 15959 additions and 1 deletions
2509
node_modules/openai/dist/api.d.ts
generated
vendored
Normal file
2509
node_modules/openai/dist/api.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
1763
node_modules/openai/dist/api.js
generated
vendored
Normal file
1763
node_modules/openai/dist/api.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
55
node_modules/openai/dist/base.d.ts
generated
vendored
Normal file
55
node_modules/openai/dist/base.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
/**
|
||||
* OpenAI API
|
||||
* APIs for sampling from and fine-tuning language models
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { Configuration } from "./configuration";
|
||||
import { AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
export declare const BASE_PATH: string;
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export declare const COLLECTION_FORMATS: {
|
||||
csv: string;
|
||||
ssv: string;
|
||||
tsv: string;
|
||||
pipes: string;
|
||||
};
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface RequestArgs
|
||||
*/
|
||||
export interface RequestArgs {
|
||||
url: string;
|
||||
options: AxiosRequestConfig;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @class BaseAPI
|
||||
*/
|
||||
export declare class BaseAPI {
|
||||
protected basePath: string;
|
||||
protected axios: AxiosInstance;
|
||||
protected configuration: Configuration | undefined;
|
||||
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @class RequiredError
|
||||
* @extends {Error}
|
||||
*/
|
||||
export declare class RequiredError extends Error {
|
||||
field: string;
|
||||
name: "RequiredError";
|
||||
constructor(field: string, msg?: string);
|
||||
}
|
61
node_modules/openai/dist/base.js
generated
vendored
Normal file
61
node_modules/openai/dist/base.js
generated
vendored
Normal file
|
@ -0,0 +1,61 @@
|
|||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* OpenAI API
|
||||
* APIs for sampling from and fine-tuning language models
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
const axios_1 = require("axios");
|
||||
exports.BASE_PATH = "https://api.openai.com/v1".replace(/\/+$/, "");
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
exports.COLLECTION_FORMATS = {
|
||||
csv: ",",
|
||||
ssv: " ",
|
||||
tsv: "\t",
|
||||
pipes: "|",
|
||||
};
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @class BaseAPI
|
||||
*/
|
||||
class BaseAPI {
|
||||
constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) {
|
||||
this.basePath = basePath;
|
||||
this.axios = axios;
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.BaseAPI = BaseAPI;
|
||||
;
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @class RequiredError
|
||||
* @extends {Error}
|
||||
*/
|
||||
class RequiredError extends Error {
|
||||
constructor(field, msg) {
|
||||
super(msg);
|
||||
this.field = field;
|
||||
this.name = "RequiredError";
|
||||
}
|
||||
}
|
||||
exports.RequiredError = RequiredError;
|
65
node_modules/openai/dist/common.d.ts
generated
vendored
Normal file
65
node_modules/openai/dist/common.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,65 @@
|
|||
/**
|
||||
* OpenAI API
|
||||
* APIs for sampling from and fine-tuning language models
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { Configuration } from "./configuration";
|
||||
import { RequestArgs } from "./base";
|
||||
import { AxiosInstance, AxiosResponse } from 'axios';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export declare const DUMMY_BASE_URL = "https://example.com";
|
||||
/**
|
||||
*
|
||||
* @throws {RequiredError}
|
||||
* @export
|
||||
*/
|
||||
export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export declare const toPathString: (url: URL) => string;
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T, any>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
|
149
node_modules/openai/dist/common.js
generated
vendored
Normal file
149
node_modules/openai/dist/common.js
generated
vendored
Normal file
|
@ -0,0 +1,149 @@
|
|||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* OpenAI API
|
||||
* APIs for sampling from and fine-tuning language models
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
|
||||
const base_1 = require("./base");
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
exports.DUMMY_BASE_URL = 'https://example.com';
|
||||
/**
|
||||
*
|
||||
* @throws {RequiredError}
|
||||
* @export
|
||||
*/
|
||||
exports.assertParamExists = function (functionName, paramName, paramValue) {
|
||||
if (paramValue === null || paramValue === undefined) {
|
||||
throw new base_1.RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
||||
}
|
||||
};
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
exports.setApiKeyToObject = function (object, keyParamName, configuration) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (configuration && configuration.apiKey) {
|
||||
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
||||
? yield configuration.apiKey(keyParamName)
|
||||
: yield configuration.apiKey;
|
||||
object[keyParamName] = localVarApiKeyValue;
|
||||
}
|
||||
});
|
||||
};
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
exports.setBasicAuthToObject = function (object, configuration) {
|
||||
if (configuration && (configuration.username || configuration.password)) {
|
||||
object["auth"] = { username: configuration.username, password: configuration.password };
|
||||
}
|
||||
};
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
exports.setBearerAuthToObject = function (object, configuration) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? yield configuration.accessToken()
|
||||
: yield configuration.accessToken;
|
||||
object["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
});
|
||||
};
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
exports.setOAuthToObject = function (object, name, scopes, configuration) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (configuration && configuration.accessToken) {
|
||||
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
||||
? yield configuration.accessToken(name, scopes)
|
||||
: yield configuration.accessToken;
|
||||
object["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
||||
}
|
||||
});
|
||||
};
|
||||
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
||||
if (typeof parameter === "object") {
|
||||
if (Array.isArray(parameter)) {
|
||||
parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
||||
}
|
||||
else {
|
||||
Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (urlSearchParams.has(key)) {
|
||||
urlSearchParams.append(key, parameter);
|
||||
}
|
||||
else {
|
||||
urlSearchParams.set(key, parameter);
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
exports.setSearchParams = function (url, ...objects) {
|
||||
const searchParams = new URLSearchParams(url.search);
|
||||
setFlattenedQueryParams(searchParams, objects);
|
||||
url.search = searchParams.toString();
|
||||
};
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
exports.serializeDataIfNeeded = function (value, requestOptions, configuration) {
|
||||
const nonString = typeof value !== 'string';
|
||||
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
||||
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
||||
: nonString;
|
||||
return needsSerialization
|
||||
? JSON.stringify(value !== undefined ? value : {})
|
||||
: (value || "");
|
||||
};
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
exports.toPathString = function (url) {
|
||||
return url.pathname + url.search + url.hash;
|
||||
};
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
exports.createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
|
||||
return (axios = globalAxios, basePath = BASE_PATH) => {
|
||||
const axiosRequestArgs = Object.assign(Object.assign({}, axiosArgs.options), { url: ((configuration === null || configuration === void 0 ? void 0 : configuration.basePath) || basePath) + axiosArgs.url });
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
};
|
91
node_modules/openai/dist/configuration.d.ts
generated
vendored
Normal file
91
node_modules/openai/dist/configuration.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,91 @@
|
|||
/**
|
||||
* OpenAI API
|
||||
* APIs for sampling from and fine-tuning language models
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
export interface ConfigurationParameters {
|
||||
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
||||
organization?: string;
|
||||
username?: string;
|
||||
password?: string;
|
||||
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
||||
basePath?: string;
|
||||
baseOptions?: any;
|
||||
formDataCtor?: new () => any;
|
||||
}
|
||||
export declare class Configuration {
|
||||
/**
|
||||
* parameter for apiKey security
|
||||
* @param name security name
|
||||
* @memberof Configuration
|
||||
*/
|
||||
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
||||
/**
|
||||
* OpenAI organization id
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
organization?: string;
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
username?: string;
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
password?: string;
|
||||
/**
|
||||
* parameter for oauth2 security
|
||||
* @param name security name
|
||||
* @param scopes oauth2 scope
|
||||
* @memberof Configuration
|
||||
*/
|
||||
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
||||
/**
|
||||
* override base path
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
basePath?: string;
|
||||
/**
|
||||
* base options for axios calls
|
||||
*
|
||||
* @type {any}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
baseOptions?: any;
|
||||
/**
|
||||
* The FormData constructor that will be used to create multipart form data
|
||||
* requests. You can inject this here so that execution environments that
|
||||
* do not support the FormData class can still run the generated client.
|
||||
*
|
||||
* @type {new () => FormData}
|
||||
*/
|
||||
formDataCtor?: new () => any;
|
||||
constructor(param?: ConfigurationParameters);
|
||||
/**
|
||||
* Check if the given MIME is a JSON MIME.
|
||||
* JSON MIME examples:
|
||||
* application/json
|
||||
* application/json; charset=UTF8
|
||||
* APPLICATION/JSON
|
||||
* application/vnd.company+json
|
||||
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
||||
* @return True if the given MIME is JSON, false otherwise.
|
||||
*/
|
||||
isJsonMime(mime: string): boolean;
|
||||
}
|
54
node_modules/openai/dist/configuration.js
generated
vendored
Normal file
54
node_modules/openai/dist/configuration.js
generated
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* OpenAI API
|
||||
* APIs for sampling from and fine-tuning language models
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Configuration = void 0;
|
||||
const packageJson = require("../package.json");
|
||||
class Configuration {
|
||||
constructor(param = {}) {
|
||||
this.apiKey = param.apiKey;
|
||||
this.organization = param.organization;
|
||||
this.username = param.username;
|
||||
this.password = param.password;
|
||||
this.accessToken = param.accessToken;
|
||||
this.basePath = param.basePath;
|
||||
this.baseOptions = param.baseOptions;
|
||||
this.formDataCtor = param.formDataCtor;
|
||||
if (!this.baseOptions) {
|
||||
this.baseOptions = {};
|
||||
}
|
||||
this.baseOptions.headers = Object.assign({ 'User-Agent': `OpenAI/NodeJS/${packageJson.version}`, 'Authorization': `Bearer ${this.apiKey}` }, this.baseOptions.headers);
|
||||
if (this.organization) {
|
||||
this.baseOptions.headers['OpenAI-Organization'] = this.organization;
|
||||
}
|
||||
if (!this.formDataCtor) {
|
||||
this.formDataCtor = require("form-data");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Check if the given MIME is a JSON MIME.
|
||||
* JSON MIME examples:
|
||||
* application/json
|
||||
* application/json; charset=UTF8
|
||||
* APPLICATION/JSON
|
||||
* application/vnd.company+json
|
||||
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
||||
* @return True if the given MIME is JSON, false otherwise.
|
||||
*/
|
||||
isJsonMime(mime) {
|
||||
const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
||||
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
||||
}
|
||||
}
|
||||
exports.Configuration = Configuration;
|
13
node_modules/openai/dist/index.d.ts
generated
vendored
Normal file
13
node_modules/openai/dist/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
* OpenAI API
|
||||
* APIs for sampling from and fine-tuning language models
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
export * from "./api";
|
||||
export * from "./configuration";
|
27
node_modules/openai/dist/index.js
generated
vendored
Normal file
27
node_modules/openai/dist/index.js
generated
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
"use strict";
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* OpenAI API
|
||||
* APIs for sampling from and fine-tuning language models
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__exportStar(require("./api"), exports);
|
||||
__exportStar(require("./configuration"), exports);
|
Loading…
Add table
Add a link
Reference in a new issue