Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: openai/openai-node
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: dc821be3018c832650e21285bade265099f99efb
Choose a base ref
...
head repository: openai/openai-node
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3ec43ee790a2eb6a0ccdd5f25faa23251b0f9b8e
Choose a head ref
  • 16 commits
  • 190 files changed
  • 2 contributors

Commits on Jun 16, 2023

  1. cleanup

    schnerd committed Jun 16, 2023
    Copy the full SHA
    206f871 View commit details

Commits on Jun 17, 2023

  1. v4.0.0-beta.0

    schnerd committed Jun 17, 2023
    Copy the full SHA
    9d818a1 View commit details

Commits on Jun 27, 2023

  1. v4.0.0-beta.1

    schnerd committed Jun 27, 2023
    Copy the full SHA
    e8b3cd3 View commit details

Commits on Jul 1, 2023

  1. v4.0.0-beta.2

    schnerd committed Jul 1, 2023
    Copy the full SHA
    492cc2e View commit details

Commits on Jul 8, 2023

  1. v4.0.0-beta.3

    schnerd committed Jul 8, 2023
    Copy the full SHA
    f35bbc5 View commit details

Commits on Jul 9, 2023

  1. v4.0.0-beta.4

    schnerd committed Jul 9, 2023
    Copy the full SHA
    be1e275 View commit details

Commits on Jul 17, 2023

  1. v4.0.0-beta.5

    schnerd committed Jul 17, 2023
    Copy the full SHA
    07b3504 View commit details

Commits on Jul 20, 2023

  1. v4.0.0-beta.6

    schnerd committed Jul 20, 2023
    Copy the full SHA
    96e5b7f View commit details

Commits on Jul 29, 2023

  1. v4.0.0-beta.7

    schnerd committed Jul 29, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    347a227 View commit details

Commits on Aug 5, 2023

  1. v4.0.0-beta.8

    schnerd committed Aug 5, 2023
    Copy the full SHA
    61cd8e1 View commit details

Commits on Aug 11, 2023

  1. v4.0.0-beta.9

    schnerd committed Aug 11, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    28276d6 View commit details

Commits on Aug 12, 2023

  1. v4.0.0-beta.10

    schnerd committed Aug 12, 2023
    Copy the full SHA
    05ff44f View commit details

Commits on Aug 13, 2023

  1. v4.0.0-beta.11

    schnerd committed Aug 13, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    68ac889 View commit details

Commits on Aug 15, 2023

  1. v4.0.0-beta.12

    schnerd committed Aug 15, 2023
    Copy the full SHA
    37de535 View commit details

Commits on Aug 16, 2023

  1. v4.0.0

    schnerd committed Aug 16, 2023
    Copy the full SHA
    31ddda8 View commit details
  2. Merge pull request #220 from openai/v4

    v4
    schnerd authored Aug 16, 2023
    Copy the full SHA
    3ec43ee View commit details
Showing with 48,087 additions and 10,387 deletions.
  1. +10 −0 .eslintrc.js
  2. +2 −2 .github/ISSUE_TEMPLATE/bug_report.yml
  3. +1 −1 .github/ISSUE_TEMPLATE/config.yml
  4. +2 −2 .github/ISSUE_TEMPLATE/feature_request.yml
  5. +10 −11 .github/workflows/test.yml
  6. +6 −1 .gitignore
  7. +0 −1 .npmignore
  8. +0 −5 .openapi-generator-ignore
  9. +0 −6 .openapi-generator/FILES
  10. +0 −1 .openapi-generator/VERSION
  11. +4 −0 .prettierignore
  12. +6 −0 .prettierrc
  13. +1 −0 .stats.yml
  14. +201 −21 LICENSE
  15. +245 −56 README.md
  16. +138 −0 api.md
  17. +0 −4,131 api.ts
  18. +0 −72 base.ts
  19. +50 −0 bin/check-test-server
  20. +21 −0 bin/cli
  21. +59 −0 build
  22. +0 −150 common.ts
  23. +0 −127 configuration.ts
  24. +0 −3,003 dist/api.d.ts
  25. +0 −2,040 dist/api.js
  26. +0 −54 dist/base.d.ts
  27. +0 −59 dist/base.js
  28. +0 −65 dist/common.d.ts
  29. +0 −151 dist/common.js
  30. +0 −91 dist/configuration.d.ts
  31. +0 −54 dist/configuration.js
  32. +0 −13 dist/index.d.ts
  33. +0 −27 dist/index.js
  34. +414 −0 ecosystem-tests/cli.ts
  35. +13 −0 ecosystem-tests/cloudflare-worker/.editorconfig
  36. +6 −0 ecosystem-tests/cloudflare-worker/.prettierrc
  37. +9 −0 ecosystem-tests/cloudflare-worker/jest.config.cjs
  38. +5,470 −0 ecosystem-tests/cloudflare-worker/package-lock.json
  39. +25 −0 ecosystem-tests/cloudflare-worker/package.json
  40. +112 −0 ecosystem-tests/cloudflare-worker/src/uploadWebApiTestCases.ts
  41. +100 −0 ecosystem-tests/cloudflare-worker/src/worker.ts
  42. +9 −0 ecosystem-tests/cloudflare-worker/tests/test.js
  43. +8 −0 ecosystem-tests/cloudflare-worker/tsconfig.check.json
  44. +101 −0 ecosystem-tests/cloudflare-worker/tsconfig.json
  45. +43 −0 ecosystem-tests/cloudflare-worker/wrangler.toml
  46. +7 −0 ecosystem-tests/deno/deno.jsonc
  47. +199 −0 ecosystem-tests/deno/deno.lock
  48. +6 −0 ecosystem-tests/deno/import_map.json
  49. +96 −0 ecosystem-tests/deno/main_test.ts
  50. +98 −0 ecosystem-tests/deno/package-lock.json
  51. +9 −0 ecosystem-tests/node-ts-cjs-dom/jest.config.cjs
  52. +3,762 −0 ecosystem-tests/node-ts-cjs-dom/package-lock.json
  53. +23 −0 ecosystem-tests/node-ts-cjs-dom/package.json
  54. BIN ecosystem-tests/node-ts-cjs-dom/sample1.mp3
  55. +148 −0 ecosystem-tests/node-ts-cjs-dom/tests/test.ts
  56. +54 −0 ecosystem-tests/node-ts-cjs-dom/tsconfig.json
  57. +54 −0 ecosystem-tests/node-ts-cjs-dom/tsconfig.nodenext.json
  58. +9 −0 ecosystem-tests/node-ts-cjs/jest.config.cjs
  59. +3,772 −0 ecosystem-tests/node-ts-cjs/package-lock.json
  60. +24 −0 ecosystem-tests/node-ts-cjs/package.json
  61. BIN ecosystem-tests/node-ts-cjs/sample1.mp3
  62. +173 −0 ecosystem-tests/node-ts-cjs/tests/test.ts
  63. +54 −0 ecosystem-tests/node-ts-cjs/tsconfig.json
  64. +54 −0 ecosystem-tests/node-ts-cjs/tsconfig.nodenext.json
  65. +23 −0 ecosystem-tests/node-ts-esm-dom/jest.config.cjs
  66. +3,835 −0 ecosystem-tests/node-ts-esm-dom/package-lock.json
  67. +23 −0 ecosystem-tests/node-ts-esm-dom/package.json
  68. BIN ecosystem-tests/node-ts-esm-dom/sample1.mp3
  69. +148 −0 ecosystem-tests/node-ts-esm-dom/tests/test.ts
  70. +54 −0 ecosystem-tests/node-ts-esm-dom/tsconfig.json
  71. +54 −0 ecosystem-tests/node-ts-esm-dom/tsconfig.noderesolution.json
  72. +23 −0 ecosystem-tests/node-ts-esm/jest.config.cjs
  73. +3,835 −0 ecosystem-tests/node-ts-esm/package-lock.json
  74. +23 −0 ecosystem-tests/node-ts-esm/package.json
  75. BIN ecosystem-tests/node-ts-esm/sample1.mp3
  76. +173 −0 ecosystem-tests/node-ts-esm/tests/test.ts
  77. +54 −0 ecosystem-tests/node-ts-esm/tsconfig.json
  78. +54 −0 ecosystem-tests/node-ts-esm/tsconfig.noderesolution.json
  79. +3 −0 ecosystem-tests/ts-browser-webpack/.babelrc
  80. +2 −0 ecosystem-tests/ts-browser-webpack/.gitignore
  81. +7,242 −0 ecosystem-tests/ts-browser-webpack/package-lock.json
  82. +29 −0 ecosystem-tests/ts-browser-webpack/package.json
  83. +10 −0 ecosystem-tests/ts-browser-webpack/public/index.html
  84. +177 −0 ecosystem-tests/ts-browser-webpack/src/index.ts
  85. +75 −0 ecosystem-tests/ts-browser-webpack/src/test.ts
  86. +22 −0 ecosystem-tests/ts-browser-webpack/tsconfig.json
  87. +45 −0 ecosystem-tests/ts-browser-webpack/webpack.config.js
  88. +36 −0 ecosystem-tests/vercel-edge/.gitignore
  89. +6 −0 ecosystem-tests/vercel-edge/next.config.js
  90. +5,455 −0 ecosystem-tests/vercel-edge/package-lock.json
  91. +27 −0 ecosystem-tests/vercel-edge/package.json
  92. BIN ecosystem-tests/vercel-edge/public/favicon.ico
  93. +5 −0 ecosystem-tests/vercel-edge/src/pages/_app.tsx
  94. +13 −0 ecosystem-tests/vercel-edge/src/pages/_document.tsx
  95. +29 −0 ecosystem-tests/vercel-edge/src/pages/ai-streaming.tsx
  96. +20 −0 ecosystem-tests/vercel-edge/src/pages/api/query-params.ts
  97. +22 −0 ecosystem-tests/vercel-edge/src/pages/api/response.ts
  98. +30 −0 ecosystem-tests/vercel-edge/src/pages/api/streaming.ts
  99. +36 −0 ecosystem-tests/vercel-edge/src/pages/api/transcribe.ts
  100. +32 −0 ecosystem-tests/vercel-edge/src/pages/api/vercel-ai-streaming.ts
  101. +19 −0 ecosystem-tests/vercel-edge/src/pages/index.tsx
  102. +23 −0 ecosystem-tests/vercel-edge/tsconfig.json
  103. +51 −0 examples/azure.ts
  104. +28 −0 examples/demo.ts
  105. +29 −0 examples/errors.ts
  106. +3 −0 examples/fine-tune-data.jsonl
  107. +41 −0 examples/fine-tunes.ts
  108. +185 −0 examples/function-call-stream.ts
  109. +142 −0 examples/function-call.ts
  110. +34 −0 examples/raw-response.ts
  111. +0 −18 index.ts
  112. +11 −0 jest.config.js
  113. +0 −191 package-lock.json
  114. +93 −22 package.json
  115. +20 −0 scripts/check-version.cjs
  116. +10 −0 scripts/fix-index-exports.cjs
  117. +20 −0 scripts/make-dist-package-json.cjs
  118. +21 −0 scripts/replace-self-referencing-imports.js
  119. +38 −0 src/_shims/ReadableStream.d.ts
  120. +5 −0 src/_shims/ReadableStream.js
  121. +7 −0 src/_shims/ReadableStream.mjs
  122. +6 −0 src/_shims/ReadableStream.node.ts
  123. +22 −0 src/_shims/agent.node.ts
  124. +12 −0 src/_shims/agent.ts
  125. +59 −0 src/_shims/fetch.d.ts
  126. +23 −0 src/_shims/fetch.deno.ts
  127. +13 −0 src/_shims/fetch.js
  128. +15 −0 src/_shims/fetch.mjs
  129. +63 −0 src/_shims/fetch.node.d.ts
  130. +12 −0 src/_shims/fetch.node.js
  131. +14 −0 src/_shims/fetch.node.mjs
  132. +29 −0 src/_shims/fileFromPath.node.ts
  133. +29 −0 src/_shims/fileFromPath.ts
  134. +43 −0 src/_shims/formdata.d.ts
  135. +16 −0 src/_shims/formdata.deno.ts
  136. +9 −0 src/_shims/formdata.js
  137. +11 −0 src/_shims/formdata.mjs
  138. +45 −0 src/_shims/formdata.node.d.ts
  139. +11 −0 src/_shims/formdata.node.js
  140. +9 −0 src/_shims/formdata.node.mjs
  141. +25 −0 src/_shims/getMultipartRequestOptions.node.ts
  142. +14 −0 src/_shims/getMultipartRequestOptions.ts
  143. +10 −0 src/_shims/node-readable.node.ts
  144. +30 −0 src/_shims/node-readable.ts
  145. +1,044 −0 src/core.ts
  146. +142 −0 src/error.ts
  147. +262 −0 src/index.ts
  148. +42 −0 src/pagination.ts
  149. +24 −0 src/resource.ts
  150. +21 −0 src/resources/audio/audio.ts
  151. +5 −0 src/resources/audio/index.ts
  152. +66 −0 src/resources/audio/transcriptions.ts
  153. +59 −0 src/resources/audio/translations.ts
  154. +20 −0 src/resources/chat/chat.ts
  155. +472 −0 src/resources/chat/completions.ts
  156. +13 −0 src/resources/chat/index.ts
  157. +302 −0 src/resources/completions.ts
  158. +108 −0 src/resources/edits.ts
  159. +109 −0 src/resources/embeddings.ts
  160. +142 −0 src/resources/files.ts
  161. +396 −0 src/resources/fine-tunes.ts
  162. +168 −0 src/resources/images.ts
  163. +37 −0 src/resources/index.ts
  164. +77 −0 src/resources/models.ts
  165. +163 −0 src/resources/moderations.ts
  166. +272 −0 src/streaming.ts
  167. +250 −0 src/uploads.ts
  168. +1 −0 src/version.ts
  169. +35 −0 tests/api-resources/audio/transcriptions.test.ts
  170. +34 −0 tests/api-resources/audio/translations.test.ts
  171. +48 −0 tests/api-resources/chat/completions.test.ts
  172. +40 −0 tests/api-resources/completions.test.ts
  173. +33 −0 tests/api-resources/edits.test.ts
  174. +30 −0 tests/api-resources/embeddings.test.ts
  175. +101 −0 tests/api-resources/files.test.ts
  176. +114 −0 tests/api-resources/fine-tunes.test.ts
  177. +84 −0 tests/api-resources/images.test.ts
  178. +62 −0 tests/api-resources/models.test.ts
  179. +26 −0 tests/api-resources/moderations.test.ts
  180. +65 −0 tests/form.test.ts
  181. +215 −0 tests/index.test.ts
  182. +25 −0 tests/responses.test.ts
  183. +26 −0 tests/stringifyQuery.test.ts
  184. +57 −0 tests/uploads.test.ts
  185. +7 −0 tsc-multi.json
  186. +32 −0 tsconfig.build.json
  187. +21 −0 tsconfig.deno.json
  188. +33 −12 tsconfig.json
  189. +33 −0 typings/digest-fetch/index.d.ts
  190. +4,248 −0 yarn.lock
10 changes: 10 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'unused-imports', 'prettier'],
rules: {
'no-unused-vars': 'off',
'prettier/prettier': 'error',
'unused-imports/no-unused-imports': 'error',
},
root: true,
};
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Bug report
description: Create a report to help us improve
labels: ["bug"]
labels: ['bug']
body:
- type: markdown
attributes:
@@ -53,4 +53,4 @@ body:
label: Library version
placeholder: openai v3.0.1
validations:
required: true
required: true
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -4,4 +4,4 @@ contact_links:
url: https://help.openai.com/
about: |
Please only file issues here that you believe represent actual bugs or feature requests for the OpenAI Node library.
If you're having general trouble with the OpenAI API, please visit our help center to get support.
If you're having general trouble with the OpenAI API, please visit our help center to get support.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Feature request
description: Suggest an idea for this library
labels: ["feature-request"]
labels: ['feature-request']
body:
- type: markdown
attributes:
@@ -17,4 +17,4 @@ body:
id: context
attributes:
label: Additional context
description: Add any other context about the feature request here.
description: Add any other context about the feature request here.
21 changes: 10 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -2,24 +2,23 @@ name: Node.js CI

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
/node_modules
node_modules
yarn-error.log
codegen.log
dist
/deno
/*.tgz
1 change: 0 additions & 1 deletion .npmignore

This file was deleted.

5 changes: 0 additions & 5 deletions .openapi-generator-ignore

This file was deleted.

6 changes: 0 additions & 6 deletions .openapi-generator/FILES

This file was deleted.

1 change: 0 additions & 1 deletion .openapi-generator/VERSION

This file was deleted.

4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CHANGELOG.md
/ecosystem-tests
/node_modules
/deno
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"arrowParens": "always",
"trailingComma": "all",
"singleQuote": true,
"printWidth": 110
}
1 change: 1 addition & 0 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
configured_endpoints: 23
222 changes: 201 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,201 @@
The MIT License

Copyright (c) OpenAI (https://openai.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2023 OpenAI

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Loading