openai 3.1.0 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/test.yml +25 -0
- package/.openapi-generator/VERSION +1 -1
- package/README.md +9 -4
- package/api.ts +581 -58
- package/base.ts +5 -4
- package/common.ts +6 -4
- package/configuration.ts +1 -1
- package/dist/api.d.ts +412 -53
- package/dist/api.js +306 -31
- package/dist/base.d.ts +3 -4
- package/dist/base.js +1 -3
- package/dist/common.d.ts +4 -4
- package/dist/common.js +3 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/index.ts +1 -1
- package/package.json +1 -1
package/base.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* OpenAI API
|
|
5
5
|
* APIs for sampling from and fine-tuning language models
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.2.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -13,10 +13,11 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
import { Configuration } from
|
|
16
|
+
import type { Configuration } from './configuration';
|
|
17
17
|
// Some imports not used depending on template conditions
|
|
18
18
|
// @ts-ignore
|
|
19
|
-
import
|
|
19
|
+
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
20
|
+
import globalAxios from 'axios';
|
|
20
21
|
|
|
21
22
|
export const BASE_PATH = "https://api.openai.com/v1".replace(/\/+$/, "");
|
|
22
23
|
|
|
@@ -64,8 +65,8 @@ export class BaseAPI {
|
|
|
64
65
|
* @extends {Error}
|
|
65
66
|
*/
|
|
66
67
|
export class RequiredError extends Error {
|
|
67
|
-
name: "RequiredError" = "RequiredError";
|
|
68
68
|
constructor(public field: string, msg?: string) {
|
|
69
69
|
super(msg);
|
|
70
|
+
this.name = "RequiredError"
|
|
70
71
|
}
|
|
71
72
|
}
|
package/common.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* OpenAI API
|
|
5
5
|
* APIs for sampling from and fine-tuning language models
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.2.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -13,9 +13,10 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
import { Configuration } from "./configuration";
|
|
17
|
-
import {
|
|
18
|
-
import { AxiosInstance, AxiosResponse } from 'axios';
|
|
16
|
+
import type { Configuration } from "./configuration";
|
|
17
|
+
import type { RequestArgs } from "./base";
|
|
18
|
+
import type { AxiosInstance, AxiosResponse } from 'axios';
|
|
19
|
+
import { RequiredError } from "./base";
|
|
19
20
|
|
|
20
21
|
/**
|
|
21
22
|
*
|
|
@@ -84,6 +85,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope
|
|
|
84
85
|
}
|
|
85
86
|
|
|
86
87
|
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
|
88
|
+
if (parameter == null) return;
|
|
87
89
|
if (typeof parameter === "object") {
|
|
88
90
|
if (Array.isArray(parameter)) {
|
|
89
91
|
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
package/configuration.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* OpenAI API
|
|
5
5
|
* APIs for sampling from and fine-tuning language models
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.2.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|