openai 4.5.0 → 4.6.0

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.
Files changed (55) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/core.js +2 -2
  3. package/core.mjs +2 -2
  4. package/package.json +8 -26
  5. package/resources/audio/audio.js +1 -1
  6. package/resources/audio/audio.mjs +1 -1
  7. package/resources/audio/transcriptions.js +2 -2
  8. package/resources/audio/transcriptions.mjs +2 -2
  9. package/resources/audio/translations.js +2 -2
  10. package/resources/audio/translations.mjs +2 -2
  11. package/resources/chat/chat.d.ts +1 -0
  12. package/resources/chat/chat.d.ts.map +1 -1
  13. package/resources/chat/chat.js +1 -1
  14. package/resources/chat/chat.js.map +1 -1
  15. package/resources/chat/chat.mjs +1 -1
  16. package/resources/chat/chat.mjs.map +1 -1
  17. package/resources/chat/completions.d.ts +7 -2
  18. package/resources/chat/completions.d.ts.map +1 -1
  19. package/resources/chat/completions.js +1 -1
  20. package/resources/chat/completions.js.map +1 -1
  21. package/resources/chat/completions.mjs +1 -1
  22. package/resources/chat/completions.mjs.map +1 -1
  23. package/resources/chat/index.d.ts +1 -0
  24. package/resources/chat/index.d.ts.map +1 -1
  25. package/resources/chat/index.js.map +1 -1
  26. package/resources/chat/index.mjs.map +1 -1
  27. package/resources/completions.js +1 -1
  28. package/resources/completions.mjs +1 -1
  29. package/resources/edits.js +1 -1
  30. package/resources/edits.mjs +1 -1
  31. package/resources/embeddings.js +1 -1
  32. package/resources/embeddings.mjs +1 -1
  33. package/resources/files.js +5 -5
  34. package/resources/files.mjs +5 -5
  35. package/resources/fine-tunes.js +2 -2
  36. package/resources/fine-tunes.mjs +2 -2
  37. package/resources/fine-tuning/fine-tuning.js +1 -1
  38. package/resources/fine-tuning/fine-tuning.mjs +1 -1
  39. package/resources/fine-tuning/jobs.js +3 -3
  40. package/resources/fine-tuning/jobs.mjs +3 -3
  41. package/resources/images.js +2 -2
  42. package/resources/images.mjs +2 -2
  43. package/resources/models.js +2 -2
  44. package/resources/models.mjs +2 -2
  45. package/resources/moderations.js +1 -1
  46. package/resources/moderations.mjs +1 -1
  47. package/src/resources/chat/chat.ts +1 -0
  48. package/src/resources/chat/completions.ts +8 -2
  49. package/src/resources/chat/index.ts +1 -0
  50. package/src/version.ts +1 -1
  51. package/uploads.js +4 -4
  52. package/uploads.mjs +4 -4
  53. package/version.d.ts +1 -1
  54. package/version.js +1 -1
  55. package/version.mjs +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.6.0 (2023-09-08)
4
+
5
+ Full Changelog: [v4.5.0...v4.6.0](https://github.com/openai/openai-node/compare/v4.5.0...v4.6.0)
6
+
7
+ ### Features
8
+
9
+ * **types:** extract ChatCompletionRole enum to its own type ([#298](https://github.com/openai/openai-node/issues/298)) ([5893e37](https://github.com/openai/openai-node/commit/5893e37406ff85331c85a3baa519ca3051a28e00))
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * fix module not found errors in Vercel edge ([#300](https://github.com/openai/openai-node/issues/300)) ([47c79fe](https://github.com/openai/openai-node/commit/47c79fee0fa715ad04410e73530829602736d85f))
15
+
3
16
  ## 4.5.0 (2023-09-06)
4
17
 
5
18
  Full Changelog: [v4.4.0...v4.5.0](https://github.com/openai/openai-node/compare/v4.4.0...v4.5.0)
package/core.js CHANGED
@@ -60,8 +60,8 @@ exports.toBase64 =
60
60
  const version_1 = require('./version.js');
61
61
  const streaming_1 = require('./streaming.js');
62
62
  const error_1 = require('./error.js');
63
- const agent_1 = require('openai/_shims/agent.js');
64
- const fetch_1 = require('openai/_shims/fetch.js');
63
+ const agent_1 = require('openai/_shims/agent');
64
+ const fetch_1 = require('openai/_shims/fetch');
65
65
  const uploads_1 = require('./uploads.js');
66
66
  var uploads_2 = require('./uploads.js');
67
67
  Object.defineProperty(exports, 'maybeMultipartFormRequestOptions', {
package/core.mjs CHANGED
@@ -29,8 +29,8 @@ var _AbstractPage_client;
29
29
  import { VERSION } from './version.mjs';
30
30
  import { Stream } from './streaming.mjs';
31
31
  import { APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError } from './error.mjs';
32
- import { getDefaultAgent } from 'openai/_shims/agent.mjs';
33
- import { fetch, isPolyfilled as fetchIsPolyfilled } from 'openai/_shims/fetch.mjs';
32
+ import { getDefaultAgent } from 'openai/_shims/agent';
33
+ import { fetch, isPolyfilled as fetchIsPolyfilled } from 'openai/_shims/fetch';
34
34
  import { isMultipartBody } from './uploads.mjs';
35
35
  export { maybeMultipartFormRequestOptions, multipartFormRequestOptions, createForm } from './uploads.mjs';
36
36
  const MAX_RETRIES = 2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openai",
3
- "version": "4.5.0",
3
+ "version": "4.6.0",
4
4
  "description": "Client library for the OpenAI API",
5
5
  "author": "OpenAI <support@openai.com>",
6
6
  "types": "./index.d.ts",
@@ -10,9 +10,10 @@
10
10
  "license": "Apache-2.0",
11
11
  "private": false,
12
12
  "exports": {
13
- "./_shims/*.mjs": {
13
+ "./_shims/*": {
14
14
  "deno": {
15
15
  "types": "./_shims/*.d.ts",
16
+ "require": "./_shims/*.js",
16
17
  "default": "./_shims/*.mjs"
17
18
  },
18
19
  "bun": {
@@ -22,47 +23,28 @@
22
23
  },
23
24
  "browser": {
24
25
  "types": "./_shims/*.d.ts",
26
+ "require": "./_shims/*.js",
25
27
  "default": "./_shims/*.mjs"
26
28
  },
27
29
  "worker": {
28
30
  "types": "./_shims/*.d.ts",
31
+ "require": "./_shims/*.js",
29
32
  "default": "./_shims/*.mjs"
30
33
  },
31
34
  "workerd": {
32
35
  "types": "./_shims/*.d.ts",
36
+ "require": "./_shims/*.js",
33
37
  "default": "./_shims/*.mjs"
34
38
  },
35
39
  "node": {
36
40
  "types": "./_shims/*-node.d.ts",
41
+ "require": "./_shims/*-node.js",
37
42
  "default": "./_shims/*-node.mjs"
38
43
  },
39
44
  "types": "./_shims/*.d.ts",
45
+ "require": "./_shims/*.js",
40
46
  "default": "./_shims/*.mjs"
41
47
  },
42
- "./_shims/*.js": {
43
- "deno": {
44
- "types": "./_shims/*.d.ts",
45
- "default": "./_shims/*.js"
46
- },
47
- "browser": {
48
- "types": "./_shims/*.d.ts",
49
- "default": "./_shims/*.js"
50
- },
51
- "worker": {
52
- "types": "./_shims/*.d.ts",
53
- "default": "./_shims/*.js"
54
- },
55
- "workerd": {
56
- "types": "./_shims/*.d.ts",
57
- "default": "./_shims/*.js"
58
- },
59
- "node": {
60
- "types": "./_shims/*-node.d.ts",
61
- "default": "./_shims/*-node.js"
62
- },
63
- "types": "./_shims/*.d.ts",
64
- "default": "./_shims/*.js"
65
- },
66
48
  ".": {
67
49
  "require": {
68
50
  "types": "./index.d.ts",
@@ -42,7 +42,7 @@ var __importStar =
42
42
  };
43
43
  Object.defineProperty(exports, '__esModule', { value: true });
44
44
  exports.Audio = void 0;
45
- const resource_1 = require('openai/resource.js');
45
+ const resource_1 = require('openai/resource');
46
46
  const transcriptions_1 = require('./transcriptions.js');
47
47
  const translations_1 = require('./translations.js');
48
48
  const API = __importStar(require('./index.js'));
@@ -1,5 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless.
2
- import { APIResource } from 'openai/resource.mjs';
2
+ import { APIResource } from 'openai/resource';
3
3
  import { Transcriptions } from './transcriptions.mjs';
4
4
  import { Translations } from './translations.mjs';
5
5
  import * as API from './index.mjs';
@@ -2,8 +2,8 @@
2
2
  // File generated from our OpenAPI spec by Stainless.
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
  exports.Transcriptions = void 0;
5
- const resource_1 = require('openai/resource.js');
6
- const core_1 = require('openai/core.js');
5
+ const resource_1 = require('openai/resource');
6
+ const core_1 = require('openai/core');
7
7
  class Transcriptions extends resource_1.APIResource {
8
8
  /**
9
9
  * Transcribes audio into the input language.
@@ -1,6 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless.
2
- import { APIResource } from 'openai/resource.mjs';
3
- import { multipartFormRequestOptions } from 'openai/core.mjs';
2
+ import { APIResource } from 'openai/resource';
3
+ import { multipartFormRequestOptions } from 'openai/core';
4
4
  export class Transcriptions extends APIResource {
5
5
  /**
6
6
  * Transcribes audio into the input language.
@@ -2,8 +2,8 @@
2
2
  // File generated from our OpenAPI spec by Stainless.
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
  exports.Translations = void 0;
5
- const resource_1 = require('openai/resource.js');
6
- const core_1 = require('openai/core.js');
5
+ const resource_1 = require('openai/resource');
6
+ const core_1 = require('openai/core');
7
7
  class Translations extends resource_1.APIResource {
8
8
  /**
9
9
  * Translates audio into English.
@@ -1,6 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless.
2
- import { APIResource } from 'openai/resource.mjs';
3
- import { multipartFormRequestOptions } from 'openai/core.mjs';
2
+ import { APIResource } from 'openai/resource';
3
+ import { multipartFormRequestOptions } from 'openai/core';
4
4
  export class Translations extends APIResource {
5
5
  /**
6
6
  * Translates audio into English.
@@ -10,6 +10,7 @@ export declare namespace Chat {
10
10
  export import ChatCompletionChunk = API.ChatCompletionChunk;
11
11
  export import ChatCompletionMessage = API.ChatCompletionMessage;
12
12
  export import ChatCompletionMessageParam = API.ChatCompletionMessageParam;
13
+ export import ChatCompletionRole = API.ChatCompletionRole;
13
14
  export import CreateChatCompletionRequestMessage = API.CreateChatCompletionRequestMessage;
14
15
  export import ChatCompletionCreateParams = API.ChatCompletionCreateParams;
15
16
  export import CompletionCreateParams = API.CompletionCreateParams;
@@ -1 +1 @@
1
- {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../src/resources/chat/chat.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,GAAG,MAAM,SAAS,CAAC;AAE/B,qBAAa,IAAK,SAAQ,WAAW;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AAQ,mBAAmB,GAAG,GAAG,CAAC,mBAAmB,CAAC;IAC5D,MAAM,QAAQ,qBAAqB,GAAG,GAAG,CAAC,qBAAqB,CAAC;IAChE,MAAM,QAAQ,0BAA0B,GAAG,GAAG,CAAC,0BAA0B,CAAC;IAC1E,MAAM,QAAQ,kBAAkB,GAAG,GAAG,CAAC,kBAAkB,CAAC;IAC1D,MAAM,QAAQ,kCAAkC,GAAG,GAAG,CAAC,kCAAkC,CAAC;IAC1F,MAAM,QAAQ,0BAA0B,GAAG,GAAG,CAAC,0BAA0B,CAAC;IAC1E,MAAM,QAAQ,sBAAsB,GAAG,GAAG,CAAC,sBAAsB,CAAC;IAClE,MAAM,QAAQ,sCAAsC,GAAG,GAAG,CAAC,sCAAsC,CAAC;IAClG,MAAM,QAAQ,kCAAkC,GAAG,GAAG,CAAC,kCAAkC,CAAC;IAC1F,MAAM,QAAQ,mCAAmC,GAAG,GAAG,CAAC,mCAAmC,CAAC;IAC5F,MAAM,QAAQ,+BAA+B,GAAG,GAAG,CAAC,+BAA+B,CAAC;CACrF"}
@@ -42,7 +42,7 @@ var __importStar =
42
42
  };
43
43
  Object.defineProperty(exports, '__esModule', { value: true });
44
44
  exports.Chat = void 0;
45
- const resource_1 = require('openai/resource.js');
45
+ const resource_1 = require('openai/resource');
46
46
  const completions_1 = require('./completions.js');
47
47
  const API = __importStar(require('./index.js'));
48
48
  class Chat extends resource_1.APIResource {
@@ -1 +1 @@
1
- {"version":3,"file":"chat.js","sourceRoot":"","sources":["../../src/resources/chat/chat.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;;;;;;;;;;;;;;;;;;;;;;;;AAErD,8CAA8C;AAC9C,kDAA4C;AAC5C,gDAA+B;AAE/B,MAAa,IAAK,SAAQ,sBAAW;IAArC;;QACE,gBAAW,GAAgB,IAAI,yBAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC1D,CAAC;CAAA;AAFD,oBAEC;AAED,WAAiB,IAAI;IACL,gBAAW,GAAG,GAAG,CAAC,WAAW,CAAC;AAY9C,CAAC,EAbgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAapB"}
1
+ {"version":3,"file":"chat.js","sourceRoot":"","sources":["../../src/resources/chat/chat.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;;;;;;;;;;;;;;;;;;;;;;;;AAErD,8CAA8C;AAC9C,kDAA4C;AAC5C,gDAA+B;AAE/B,MAAa,IAAK,SAAQ,sBAAW;IAArC;;QACE,gBAAW,GAAgB,IAAI,yBAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC1D,CAAC;CAAA;AAFD,oBAEC;AAED,WAAiB,IAAI;IACL,gBAAW,GAAG,GAAG,CAAC,WAAW,CAAC;AAa9C,CAAC,EAdgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAcpB"}
@@ -1,5 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless.
2
- import { APIResource } from 'openai/resource.mjs';
2
+ import { APIResource } from 'openai/resource';
3
3
  import { Completions } from './completions.mjs';
4
4
  import * as API from './index.mjs';
5
5
  export class Chat extends APIResource {
@@ -1 +1 @@
1
- {"version":3,"file":"chat.mjs","sourceRoot":"","sources":["../../src/resources/chat/chat.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAE9C,EAAE,WAAW,EAAE,MAAM,iBAAiB;OACtC,EAAE,WAAW,EAAE;OACf,KAAK,GAAG;AAEf,MAAM,OAAO,IAAK,SAAQ,WAAW;IAArC;;QACE,gBAAW,GAAgB,IAAI,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC1D,CAAC;CAAA;AAED,WAAiB,IAAI;IACL,gBAAW,GAAG,GAAG,CAAC,WAAW,CAAC;AAY9C,CAAC,EAbgB,IAAI,KAAJ,IAAI,QAapB"}
1
+ {"version":3,"file":"chat.mjs","sourceRoot":"","sources":["../../src/resources/chat/chat.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAE9C,EAAE,WAAW,EAAE,MAAM,iBAAiB;OACtC,EAAE,WAAW,EAAE;OACf,KAAK,GAAG;AAEf,MAAM,OAAO,IAAK,SAAQ,WAAW;IAArC;;QACE,gBAAW,GAAgB,IAAI,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC1D,CAAC;CAAA;AAED,WAAiB,IAAI;IACL,gBAAW,GAAG,GAAG,CAAC,WAAW,CAAC;AAa9C,CAAC,EAdgB,IAAI,KAAJ,IAAI,QAcpB"}
@@ -133,7 +133,7 @@ export declare namespace ChatCompletionChunk {
133
133
  /**
134
134
  * The role of the author of this message.
135
135
  */
136
- role?: 'system' | 'user' | 'assistant' | 'function';
136
+ role?: ChatCompletionRole;
137
137
  }
138
138
  namespace Delta {
139
139
  /**
@@ -167,7 +167,7 @@ export interface ChatCompletionMessage {
167
167
  /**
168
168
  * The role of the author of this message.
169
169
  */
170
- role: 'system' | 'user' | 'assistant' | 'function';
170
+ role: ChatCompletionRole;
171
171
  /**
172
172
  * The name and arguments of a function that should be called, as generated by the
173
173
  * model.
@@ -236,6 +236,10 @@ export declare namespace ChatCompletionMessageParam {
236
236
  name: string;
237
237
  }
238
238
  }
239
+ /**
240
+ * The role of the author of this message.
241
+ */
242
+ export type ChatCompletionRole = 'system' | 'user' | 'assistant' | 'function';
239
243
  /**
240
244
  * @deprecated ChatCompletionMessageParam should be used instead
241
245
  */
@@ -426,6 +430,7 @@ export declare namespace Completions {
426
430
  export import ChatCompletionChunk = API.ChatCompletionChunk;
427
431
  export import ChatCompletionMessage = API.ChatCompletionMessage;
428
432
  export import ChatCompletionMessageParam = API.ChatCompletionMessageParam;
433
+ export import ChatCompletionRole = API.ChatCompletionRole;
429
434
  export import CreateChatCompletionRequestMessage = API.CreateChatCompletionRequestMessage;
430
435
  export import ChatCompletionCreateParams = API.ChatCompletionCreateParams;
431
436
  export import CompletionCreateParams = API.CompletionCreateParams;
@@ -1 +1 @@
1
- {"version":3,"file":"completions.d.ts","sourceRoot":"","sources":["../../src/resources/chat/completions.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AM,WAAW,mCAAoC,SAAQ,8BAA8B;IACzF;;;;;;;OAOG;IACH,MAAM,EAAE,IAAI,CAAC;CACd;AAED;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,mCAAmC,CAAC;AAElF,yBAAiB,WAAW,CAAC;IAC3B,MAAM,QAAQ,cAAc,GAAG,GAAG,CAAC,cAAc,CAAC;IAClD,MAAM,QAAQ,mBAAmB,GAAG,GAAG,CAAC,mBAAmB,CAAC;IAC5D,MAAM,QAAQ,qBAAqB,GAAG,GAAG,CAAC,qBAAqB,CAAC;IAChE,MAAM,QAAQ,0BAA0B,GAAG,GAAG,CAAC,0BAA0B,CAAC;IAC1E,MAAM,QAAQ,kBAAkB,GAAG,GAAG,CAAC,kBAAkB,CAAC;IAC1D,MAAM,QAAQ,kCAAkC,GAAG,GAAG,CAAC,kCAAkC,CAAC;IAC1F,MAAM,QAAQ,0BAA0B,GAAG,GAAG,CAAC,0BAA0B,CAAC;IAC1E,MAAM,QAAQ,sBAAsB,GAAG,GAAG,CAAC,sBAAsB,CAAC;IAClE,MAAM,QAAQ,sCAAsC,GAAG,GAAG,CAAC,sCAAsC,CAAC;IAClG,MAAM,QAAQ,kCAAkC,GAAG,GAAG,CAAC,kCAAkC,CAAC;IAC1F,MAAM,QAAQ,mCAAmC,GAAG,GAAG,CAAC,mCAAmC,CAAC;IAC5F,MAAM,QAAQ,+BAA+B,GAAG,GAAG,CAAC,+BAA+B,CAAC;CACrF"}
@@ -2,7 +2,7 @@
2
2
  // File generated from our OpenAPI spec by Stainless.
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
  exports.Completions = void 0;
5
- const resource_1 = require('openai/resource.js');
5
+ const resource_1 = require('openai/resource');
6
6
  class Completions extends resource_1.APIResource {
7
7
  create(body, options) {
8
8
  var _a;
@@ -1 +1 @@
1
- {"version":3,"file":"completions.js","sourceRoot":"","sources":["../../src/resources/chat/completions.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAIrD,8CAA8C;AAK9C,MAAa,WAAY,SAAQ,sBAAW;IAgB1C,MAAM,CACJ,IAAgC,EAChC,OAA6B;;QAE7B,OAAO,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,MAAA,IAAI,CAAC,MAAM,mCAAI,KAAK,EAAE,CAE7C,CAAC;IAC9C,CAAC;CACF;AAxBD,kCAwBC;AA6cD,WAAiB,WAAW;AAY5B,CAAC,EAZgB,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAY3B"}
1
+ {"version":3,"file":"completions.js","sourceRoot":"","sources":["../../src/resources/chat/completions.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAIrD,8CAA8C;AAK9C,MAAa,WAAY,SAAQ,sBAAW;IAgB1C,MAAM,CACJ,IAAgC,EAChC,OAA6B;;QAE7B,OAAO,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,MAAA,IAAI,CAAC,MAAM,mCAAI,KAAK,EAAE,CAE7C,CAAC;IAC9C,CAAC;CACF;AAxBD,kCAwBC;AAkdD,WAAiB,WAAW;AAa5B,CAAC,EAbgB,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAa3B"}
@@ -1,5 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless.
2
- import { APIResource } from 'openai/resource.mjs';
2
+ import { APIResource } from 'openai/resource';
3
3
  export class Completions extends APIResource {
4
4
  create(body, options) {
5
5
  var _a;
@@ -1 +1 @@
1
- {"version":3,"file":"completions.mjs","sourceRoot":"","sources":["../../src/resources/chat/completions.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAI9C,EAAE,WAAW,EAAE,MAAM,iBAAiB;AAK7C,MAAM,OAAO,WAAY,SAAQ,WAAW;IAgB1C,MAAM,CACJ,IAAgC,EAChC,OAA6B;;QAE7B,OAAO,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,MAAA,IAAI,CAAC,MAAM,mCAAI,KAAK,EAAE,CAE7C,CAAC;IAC9C,CAAC;CACF;AA6cD,WAAiB,WAAW;AAY5B,CAAC,EAZgB,WAAW,KAAX,WAAW,QAY3B"}
1
+ {"version":3,"file":"completions.mjs","sourceRoot":"","sources":["../../src/resources/chat/completions.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAI9C,EAAE,WAAW,EAAE,MAAM,iBAAiB;AAK7C,MAAM,OAAO,WAAY,SAAQ,WAAW;IAgB1C,MAAM,CACJ,IAAgC,EAChC,OAA6B;;QAE7B,OAAO,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,MAAA,IAAI,CAAC,MAAM,mCAAI,KAAK,EAAE,CAE7C,CAAC;IAC9C,CAAC;CACF;AAkdD,WAAiB,WAAW;AAa5B,CAAC,EAbgB,WAAW,KAAX,WAAW,QAa3B"}
@@ -4,6 +4,7 @@ export {
4
4
  ChatCompletionChunk,
5
5
  ChatCompletionMessage,
6
6
  ChatCompletionMessageParam,
7
+ ChatCompletionRole,
7
8
  CreateChatCompletionRequestMessage,
8
9
  ChatCompletionCreateParams,
9
10
  CompletionCreateParams,
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/chat/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,qBAAqB,EACrB,0BAA0B,EAC1B,kCAAkC,EAClC,0BAA0B,EAC1B,sBAAsB,EACtB,sCAAsC,EACtC,kCAAkC,EAClC,mCAAmC,EACnC,+BAA+B,EAC/B,WAAW,GACZ,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/chat/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,qBAAqB,EACrB,0BAA0B,EAC1B,kBAAkB,EAClB,kCAAkC,EAClC,0BAA0B,EAC1B,sBAAsB,EACtB,sCAAsC,EACtC,kCAAkC,EAClC,mCAAmC,EACnC,+BAA+B,EAC/B,WAAW,GACZ,MAAM,eAAe,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/chat/index.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAErD,kCAA8B;AAArB,4FAAA,IAAI,OAAA;AACb,gDAauB;AADrB,0GAAA,WAAW,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/chat/index.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAErD,kCAA8B;AAArB,4FAAA,IAAI,OAAA;AACb,gDAcuB;AADrB,0GAAA,WAAW,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/chat/index.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAE9C,EAAE,IAAI,EAAE;OACR,EAYL,WAAW,GACZ"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/chat/index.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAE9C,EAAE,IAAI,EAAE;OACR,EAaL,WAAW,GACZ"}
@@ -2,7 +2,7 @@
2
2
  // File generated from our OpenAPI spec by Stainless.
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
  exports.Completions = void 0;
5
- const resource_1 = require('openai/resource.js');
5
+ const resource_1 = require('openai/resource');
6
6
  class Completions extends resource_1.APIResource {
7
7
  create(body, options) {
8
8
  var _a;
@@ -1,5 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless.
2
- import { APIResource } from 'openai/resource.mjs';
2
+ import { APIResource } from 'openai/resource';
3
3
  export class Completions extends APIResource {
4
4
  create(body, options) {
5
5
  var _a;
@@ -2,7 +2,7 @@
2
2
  // File generated from our OpenAPI spec by Stainless.
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
  exports.Edits = void 0;
5
- const resource_1 = require('openai/resource.js');
5
+ const resource_1 = require('openai/resource');
6
6
  class Edits extends resource_1.APIResource {
7
7
  /**
8
8
  * Creates a new edit for the provided input, instruction, and parameters.
@@ -1,5 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless.
2
- import { APIResource } from 'openai/resource.mjs';
2
+ import { APIResource } from 'openai/resource';
3
3
  export class Edits extends APIResource {
4
4
  /**
5
5
  * Creates a new edit for the provided input, instruction, and parameters.
@@ -2,7 +2,7 @@
2
2
  // File generated from our OpenAPI spec by Stainless.
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
  exports.Embeddings = void 0;
5
- const resource_1 = require('openai/resource.js');
5
+ const resource_1 = require('openai/resource');
6
6
  class Embeddings extends resource_1.APIResource {
7
7
  /**
8
8
  * Creates an embedding vector representing the input text.
@@ -1,5 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless.
2
- import { APIResource } from 'openai/resource.mjs';
2
+ import { APIResource } from 'openai/resource';
3
3
  export class Embeddings extends APIResource {
4
4
  /**
5
5
  * Creates an embedding vector representing the input text.
@@ -2,11 +2,11 @@
2
2
  // File generated from our OpenAPI spec by Stainless.
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
  exports.FileObjectsPage = exports.Files = void 0;
5
- const resource_1 = require('openai/resource.js');
6
- const core_1 = require('openai/core.js');
7
- const error_1 = require('openai/error.js');
8
- const core_2 = require('openai/core.js');
9
- const pagination_1 = require('openai/pagination.js');
5
+ const resource_1 = require('openai/resource');
6
+ const core_1 = require('openai/core');
7
+ const error_1 = require('openai/error');
8
+ const core_2 = require('openai/core');
9
+ const pagination_1 = require('openai/pagination');
10
10
  class Files extends resource_1.APIResource {
11
11
  /**
12
12
  * Upload a file that contains document(s) to be used across various
@@ -1,9 +1,9 @@
1
1
  // File generated from our OpenAPI spec by Stainless.
2
- import { APIResource } from 'openai/resource.mjs';
3
- import { sleep } from 'openai/core.mjs';
4
- import { APIConnectionTimeoutError } from 'openai/error.mjs';
5
- import { multipartFormRequestOptions } from 'openai/core.mjs';
6
- import { Page } from 'openai/pagination.mjs';
2
+ import { APIResource } from 'openai/resource';
3
+ import { sleep } from 'openai/core';
4
+ import { APIConnectionTimeoutError } from 'openai/error';
5
+ import { multipartFormRequestOptions } from 'openai/core';
6
+ import { Page } from 'openai/pagination';
7
7
  export class Files extends APIResource {
8
8
  /**
9
9
  * Upload a file that contains document(s) to be used across various
@@ -2,8 +2,8 @@
2
2
  // File generated from our OpenAPI spec by Stainless.
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
  exports.FineTunesPage = exports.FineTunes = void 0;
5
- const resource_1 = require('openai/resource.js');
6
- const pagination_1 = require('openai/pagination.js');
5
+ const resource_1 = require('openai/resource');
6
+ const pagination_1 = require('openai/pagination');
7
7
  class FineTunes extends resource_1.APIResource {
8
8
  /**
9
9
  * Creates a job that fine-tunes a specified model from a given dataset.
@@ -1,6 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless.
2
- import { APIResource } from 'openai/resource.mjs';
3
- import { Page } from 'openai/pagination.mjs';
2
+ import { APIResource } from 'openai/resource';
3
+ import { Page } from 'openai/pagination';
4
4
  export class FineTunes extends APIResource {
5
5
  /**
6
6
  * Creates a job that fine-tunes a specified model from a given dataset.
@@ -42,7 +42,7 @@ var __importStar =
42
42
  };
43
43
  Object.defineProperty(exports, '__esModule', { value: true });
44
44
  exports.FineTuning = void 0;
45
- const resource_1 = require('openai/resource.js');
45
+ const resource_1 = require('openai/resource');
46
46
  const jobs_1 = require('./jobs.js');
47
47
  const API = __importStar(require('./index.js'));
48
48
  class FineTuning extends resource_1.APIResource {
@@ -1,5 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless.
2
- import { APIResource } from 'openai/resource.mjs';
2
+ import { APIResource } from 'openai/resource';
3
3
  import { Jobs } from './jobs.mjs';
4
4
  import * as API from './index.mjs';
5
5
  export class FineTuning extends APIResource {
@@ -2,9 +2,9 @@
2
2
  // File generated from our OpenAPI spec by Stainless.
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
  exports.FineTuningJobEventsPage = exports.FineTuningJobsPage = exports.Jobs = void 0;
5
- const resource_1 = require('openai/resource.js');
6
- const core_1 = require('openai/core.js');
7
- const pagination_1 = require('openai/pagination.js');
5
+ const resource_1 = require('openai/resource');
6
+ const core_1 = require('openai/core');
7
+ const pagination_1 = require('openai/pagination');
8
8
  class Jobs extends resource_1.APIResource {
9
9
  /**
10
10
  * Creates a job that fine-tunes a specified model from a given dataset.
@@ -1,7 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless.
2
- import { APIResource } from 'openai/resource.mjs';
3
- import { isRequestOptions } from 'openai/core.mjs';
4
- import { CursorPage } from 'openai/pagination.mjs';
2
+ import { APIResource } from 'openai/resource';
3
+ import { isRequestOptions } from 'openai/core';
4
+ import { CursorPage } from 'openai/pagination';
5
5
  export class Jobs extends APIResource {
6
6
  /**
7
7
  * Creates a job that fine-tunes a specified model from a given dataset.
@@ -2,8 +2,8 @@
2
2
  // File generated from our OpenAPI spec by Stainless.
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
  exports.Images = void 0;
5
- const resource_1 = require('openai/resource.js');
6
- const core_1 = require('openai/core.js');
5
+ const resource_1 = require('openai/resource');
6
+ const core_1 = require('openai/core');
7
7
  class Images extends resource_1.APIResource {
8
8
  /**
9
9
  * Creates a variation of a given image.
@@ -1,6 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless.
2
- import { APIResource } from 'openai/resource.mjs';
3
- import { multipartFormRequestOptions } from 'openai/core.mjs';
2
+ import { APIResource } from 'openai/resource';
3
+ import { multipartFormRequestOptions } from 'openai/core';
4
4
  export class Images extends APIResource {
5
5
  /**
6
6
  * Creates a variation of a given image.
@@ -2,8 +2,8 @@
2
2
  // File generated from our OpenAPI spec by Stainless.
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
  exports.ModelsPage = exports.Models = void 0;
5
- const resource_1 = require('openai/resource.js');
6
- const pagination_1 = require('openai/pagination.js');
5
+ const resource_1 = require('openai/resource');
6
+ const pagination_1 = require('openai/pagination');
7
7
  class Models extends resource_1.APIResource {
8
8
  /**
9
9
  * Retrieves a model instance, providing basic information about the model such as
@@ -1,6 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless.
2
- import { APIResource } from 'openai/resource.mjs';
3
- import { Page } from 'openai/pagination.mjs';
2
+ import { APIResource } from 'openai/resource';
3
+ import { Page } from 'openai/pagination';
4
4
  export class Models extends APIResource {
5
5
  /**
6
6
  * Retrieves a model instance, providing basic information about the model such as
@@ -2,7 +2,7 @@
2
2
  // File generated from our OpenAPI spec by Stainless.
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
  exports.Moderations = void 0;
5
- const resource_1 = require('openai/resource.js');
5
+ const resource_1 = require('openai/resource');
6
6
  class Moderations extends resource_1.APIResource {
7
7
  /**
8
8
  * Classifies if text violates OpenAI's Content Policy
@@ -1,5 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless.
2
- import { APIResource } from 'openai/resource.mjs';
2
+ import { APIResource } from 'openai/resource';
3
3
  export class Moderations extends APIResource {
4
4
  /**
5
5
  * Classifies if text violates OpenAI's Content Policy
@@ -14,6 +14,7 @@ export namespace Chat {
14
14
  export import ChatCompletionChunk = API.ChatCompletionChunk;
15
15
  export import ChatCompletionMessage = API.ChatCompletionMessage;
16
16
  export import ChatCompletionMessageParam = API.ChatCompletionMessageParam;
17
+ export import ChatCompletionRole = API.ChatCompletionRole;
17
18
  export import CreateChatCompletionRequestMessage = API.CreateChatCompletionRequestMessage;
18
19
  export import ChatCompletionCreateParams = API.ChatCompletionCreateParams;
19
20
  export import CompletionCreateParams = API.CompletionCreateParams;
@@ -164,7 +164,7 @@ export namespace ChatCompletionChunk {
164
164
  /**
165
165
  * The role of the author of this message.
166
166
  */
167
- role?: 'system' | 'user' | 'assistant' | 'function';
167
+ role?: ChatCompletionRole;
168
168
  }
169
169
 
170
170
  export namespace Delta {
@@ -202,7 +202,7 @@ export interface ChatCompletionMessage {
202
202
  /**
203
203
  * The role of the author of this message.
204
204
  */
205
- role: 'system' | 'user' | 'assistant' | 'function';
205
+ role: ChatCompletionRole;
206
206
 
207
207
  /**
208
208
  * The name and arguments of a function that should be called, as generated by the
@@ -281,6 +281,11 @@ export namespace ChatCompletionMessageParam {
281
281
  }
282
282
  }
283
283
 
284
+ /**
285
+ * The role of the author of this message.
286
+ */
287
+ export type ChatCompletionRole = 'system' | 'user' | 'assistant' | 'function';
288
+
284
289
  /**
285
290
  * @deprecated ChatCompletionMessageParam should be used instead
286
291
  */
@@ -497,6 +502,7 @@ export namespace Completions {
497
502
  export import ChatCompletionChunk = API.ChatCompletionChunk;
498
503
  export import ChatCompletionMessage = API.ChatCompletionMessage;
499
504
  export import ChatCompletionMessageParam = API.ChatCompletionMessageParam;
505
+ export import ChatCompletionRole = API.ChatCompletionRole;
500
506
  export import CreateChatCompletionRequestMessage = API.CreateChatCompletionRequestMessage;
501
507
  export import ChatCompletionCreateParams = API.ChatCompletionCreateParams;
502
508
  export import CompletionCreateParams = API.CompletionCreateParams;
@@ -6,6 +6,7 @@ export {
6
6
  ChatCompletionChunk,
7
7
  ChatCompletionMessage,
8
8
  ChatCompletionMessageParam,
9
+ ChatCompletionRole,
9
10
  CreateChatCompletionRequestMessage,
10
11
  ChatCompletionCreateParams,
11
12
  CompletionCreateParams,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '4.5.0'; // x-release-please-version
1
+ export const VERSION = '4.6.0'; // x-release-please-version
package/uploads.js CHANGED
@@ -12,16 +12,16 @@ exports.createForm =
12
12
  exports.isResponseLike =
13
13
  exports.fileFromPath =
14
14
  void 0;
15
- const form_data_1 = require('openai/_shims/form-data.js');
16
- const getMultipartRequestOptions_1 = require('openai/_shims/getMultipartRequestOptions.js');
17
- const fileFromPath_1 = require('openai/_shims/fileFromPath.js');
15
+ const form_data_1 = require('openai/_shims/form-data');
16
+ const getMultipartRequestOptions_1 = require('openai/_shims/getMultipartRequestOptions');
17
+ const fileFromPath_1 = require('openai/_shims/fileFromPath');
18
18
  Object.defineProperty(exports, 'fileFromPath', {
19
19
  enumerable: true,
20
20
  get: function () {
21
21
  return fileFromPath_1.fileFromPath;
22
22
  },
23
23
  });
24
- const node_readable_1 = require('openai/_shims/node-readable.js');
24
+ const node_readable_1 = require('openai/_shims/node-readable');
25
25
  const isResponseLike = (value) =>
26
26
  value != null &&
27
27
  typeof value === 'object' &&
package/uploads.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { FormData, File } from 'openai/_shims/form-data.mjs';
2
- import { getMultipartRequestOptions } from 'openai/_shims/getMultipartRequestOptions.mjs';
3
- import { fileFromPath } from 'openai/_shims/fileFromPath.mjs';
4
- import { isFsReadStream } from 'openai/_shims/node-readable.mjs';
1
+ import { FormData, File } from 'openai/_shims/form-data';
2
+ import { getMultipartRequestOptions } from 'openai/_shims/getMultipartRequestOptions';
3
+ import { fileFromPath } from 'openai/_shims/fileFromPath';
4
+ import { isFsReadStream } from 'openai/_shims/node-readable';
5
5
  export { fileFromPath };
6
6
  export const isResponseLike = (value) =>
7
7
  value != null &&
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = '4.5.0';
1
+ export declare const VERSION = '4.6.0';
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
2
  Object.defineProperty(exports, '__esModule', { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '4.5.0'; // x-release-please-version
4
+ exports.VERSION = '4.6.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '4.5.0'; // x-release-please-version
1
+ export const VERSION = '4.6.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map