@kudoai/chatgpt.js 2.6.7 → 2.6.8

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 (129) hide show
  1. package/LICENSE.md +9 -0
  2. package/README.md +26 -24
  3. package/chatgpt.js +2056 -2060
  4. package/dist/chatgpt.min.js +3 -3
  5. package/docs/README.md +26 -24
  6. package/docs/SECURITY.md +25 -25
  7. package/docs/USERGUIDE.md +6 -6
  8. package/docs/de/LICENSE.md +29 -29
  9. package/docs/de/README.md +25 -23
  10. package/docs/de/SECURITY.md +25 -25
  11. package/docs/es/LICENSE.md +29 -29
  12. package/docs/es/README.md +25 -23
  13. package/docs/es/SECURITY.md +25 -25
  14. package/docs/fr/LICENSE.md +29 -29
  15. package/docs/fr/README.md +25 -23
  16. package/docs/fr/SECURITY.md +25 -25
  17. package/docs/hi/LICENSE.md +29 -29
  18. package/docs/hi/README.md +25 -23
  19. package/docs/hi/SECURITY.md +25 -25
  20. package/docs/it/LICENSE.md +26 -26
  21. package/docs/it/README.md +25 -23
  22. package/docs/it/SECURITY.md +25 -25
  23. package/docs/ja/LICENSE.md +29 -29
  24. package/docs/ja/README.md +25 -23
  25. package/docs/ja/SECURITY.md +25 -25
  26. package/docs/ko/LICENSE.md +32 -32
  27. package/docs/ko/README.md +25 -23
  28. package/docs/ko/SECURITY.md +25 -25
  29. package/docs/ne/LICENSE.md +35 -35
  30. package/docs/ne/README.md +25 -23
  31. package/docs/ne/SECURITY.md +25 -25
  32. package/docs/nl/LICENSE.md +29 -29
  33. package/docs/nl/README.md +25 -23
  34. package/docs/nl/SECURITY.md +25 -25
  35. package/docs/pt/LICENSE.md +28 -28
  36. package/docs/pt/README.md +25 -23
  37. package/docs/pt/SECURITY.md +25 -25
  38. package/docs/vi/LICENSE.md +29 -29
  39. package/docs/vi/README.md +25 -23
  40. package/docs/vi/SECURITY.md +25 -25
  41. package/docs/zh-cn/LICENSE.md +29 -29
  42. package/docs/zh-cn/README.md +25 -24
  43. package/docs/zh-cn/SECURITY.md +25 -25
  44. package/docs/zh-tw/LICENSE.md +29 -29
  45. package/docs/zh-tw/README.md +26 -24
  46. package/docs/zh-tw/SECURITY.md +25 -25
  47. package/package.json +73 -73
  48. package/starters/chrome/LICENSE.md +31 -43
  49. package/starters/chrome/docs/README.md +93 -93
  50. package/starters/chrome/docs/SECURITY.md +17 -17
  51. package/starters/chrome/docs/de/LICENSE.md +31 -31
  52. package/starters/chrome/docs/de/README.md +93 -93
  53. package/starters/chrome/docs/es/LICENSE.md +31 -31
  54. package/starters/chrome/docs/es/README.md +93 -93
  55. package/starters/chrome/docs/fr/LICENSE.md +31 -31
  56. package/starters/chrome/docs/fr/README.md +93 -93
  57. package/starters/chrome/docs/hi/LICENSE.md +31 -31
  58. package/starters/chrome/docs/hi/README.md +93 -93
  59. package/starters/chrome/docs/hi/SECURITY.md +17 -17
  60. package/starters/chrome/docs/it/LICENSE.md +29 -29
  61. package/starters/chrome/docs/it/README.md +93 -93
  62. package/starters/chrome/docs/ja/LICENSE.md +31 -31
  63. package/starters/chrome/docs/ja/README.md +93 -93
  64. package/starters/chrome/docs/ko/LICENSE.md +34 -34
  65. package/starters/chrome/docs/ko/README.md +93 -93
  66. package/starters/chrome/docs/nl/LICENSE.md +31 -30
  67. package/starters/chrome/docs/nl/README.md +93 -93
  68. package/starters/chrome/docs/pt/LICENSE.md +31 -31
  69. package/starters/chrome/docs/pt/README.md +93 -93
  70. package/starters/chrome/docs/vi/LICENSE.md +31 -31
  71. package/starters/chrome/docs/vi/README.md +93 -93
  72. package/starters/chrome/docs/zh-cn/LICENSE.md +31 -31
  73. package/starters/chrome/docs/zh-cn/README.md +93 -93
  74. package/starters/chrome/docs/zh-cn/SECURITY.md +17 -17
  75. package/starters/chrome/docs/zh-tw/LICENSE.md +31 -31
  76. package/starters/chrome/docs/zh-tw/README.md +93 -93
  77. package/starters/chrome/extension/background.js +14 -14
  78. package/starters/chrome/extension/content.js +62 -62
  79. package/starters/chrome/extension/lib/chatgpt.js +2057 -2061
  80. package/starters/chrome/extension/lib/settings-utils.js +24 -24
  81. package/starters/chrome/extension/manifest.json +24 -24
  82. package/starters/chrome/extension/popup/index.html +62 -62
  83. package/starters/chrome/extension/popup/popup.js +92 -92
  84. package/starters/chrome/extension/popup/style.css +55 -55
  85. package/starters/docs/LICENSE.md +13 -25
  86. package/starters/docs/README.md +29 -29
  87. package/starters/docs/de/LICENSE.md +13 -13
  88. package/starters/docs/de/README.md +29 -29
  89. package/starters/docs/es/LICENSE.md +13 -13
  90. package/starters/docs/es/README.md +29 -29
  91. package/starters/docs/fr/LICENSE.md +13 -13
  92. package/starters/docs/fr/README.md +29 -29
  93. package/starters/docs/hi/LICENSE.md +13 -13
  94. package/starters/docs/hi/README.md +29 -29
  95. package/starters/docs/it/LICENSE.md +11 -11
  96. package/starters/docs/it/README.md +29 -29
  97. package/starters/docs/ja/LICENSE.md +13 -13
  98. package/starters/docs/ja/README.md +30 -30
  99. package/starters/docs/ko/LICENSE.md +16 -16
  100. package/starters/docs/ko/README.md +29 -29
  101. package/starters/docs/nl/LICENSE.md +13 -13
  102. package/starters/docs/nl/README.md +29 -29
  103. package/starters/docs/pt/LICENSE.md +13 -13
  104. package/starters/docs/pt/README.md +29 -29
  105. package/starters/docs/vi/LICENSE.md +13 -13
  106. package/starters/docs/vi/README.md +29 -29
  107. package/starters/docs/zh-cn/LICENSE.md +13 -13
  108. package/starters/docs/zh-cn/README.md +30 -30
  109. package/starters/docs/zh-tw/LICENSE.md +13 -13
  110. package/starters/docs/zh-tw/README.md +29 -29
  111. package/starters/greasemonkey/LICENSE.md +31 -43
  112. package/starters/greasemonkey/chatgpt.js-greasemonkey-starter.user.js +5 -5
  113. package/starters/greasemonkey/docs/README.md +7 -7
  114. package/starters/greasemonkey/docs/SECURITY.md +17 -17
  115. package/starters/greasemonkey/docs/de/LICENSE.md +31 -31
  116. package/starters/greasemonkey/docs/es/LICENSE.md +31 -31
  117. package/starters/greasemonkey/docs/fr/LICENSE.md +31 -31
  118. package/starters/greasemonkey/docs/hi/LICENSE.md +31 -31
  119. package/starters/greasemonkey/docs/hi/SECURITY.md +17 -17
  120. package/starters/greasemonkey/docs/it/LICENSE.md +29 -29
  121. package/starters/greasemonkey/docs/ja/LICENSE.md +31 -31
  122. package/starters/greasemonkey/docs/ko/LICENSE.md +34 -34
  123. package/starters/greasemonkey/docs/nl/LICENSE.md +31 -30
  124. package/starters/greasemonkey/docs/pt/LICENSE.md +31 -31
  125. package/starters/greasemonkey/docs/vi/LICENSE.md +31 -31
  126. package/starters/greasemonkey/docs/zh-cn/LICENSE.md +31 -31
  127. package/starters/greasemonkey/docs/zh-cn/SECURITY.md +17 -17
  128. package/starters/greasemonkey/docs/zh-tw/LICENSE.md +31 -31
  129. package/LICENSE +0 -21
package/LICENSE.md ADDED
@@ -0,0 +1,9 @@
1
+ # MIT License
2
+
3
+ **Copyright © 2023–2024 [KudoAI](https://github.com/KudoAI) & [contributors](.#-contributors).**
4
+
5
+ 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:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ 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.
package/README.md CHANGED
@@ -27,10 +27,12 @@
27
27
 
28
28
  <br>
29
29
 
30
- <picture>
31
- <source type="image/png" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/kudoai/chatgpt.js/main/media/images/logos/chatgpt.js/with-reflection/darkmode.png">
32
- <img width=800 src="https://raw.githubusercontent.com/kudoai/chatgpt.js/main/media/images/logos/chatgpt.js/with-reflection/lightmode.png">
33
- </picture>
30
+ <a href="https://chatgpt.js.org">
31
+ <picture>
32
+ <source type="image/png" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/media/images/logos/chatgpt.js/with-reflection/darkmode.png">
33
+ <img width=800 src="https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/media/images/logos/chatgpt.js/with-reflection/lightmode.png">
34
+ </picture>
35
+ </a>
34
36
 
35
37
  ### 🤖 A powerful client-side JavaScript library for ChatGPT
36
38
 
@@ -41,10 +43,10 @@
41
43
  <div id="shields" align="center">
42
44
 
43
45
  [![](https://img.shields.io/github/stars/KudoAI/chatgpt.js?label=Stars&color=af68ff&logo=github&logoColor=white&labelColor=464646&style=for-the-badge)](https://github.com/KudoAI/chatgpt.js/stargazers)
44
- [![](https://img.shields.io/badge/License-MIT-green.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge)](https://github.com/KudoAI/chatgpt.js/blob/main/LICENSE)
45
- [![](https://img.shields.io/github/commit-activity/m/kudoai/chatgpt.js?label=Commits&logo=github&logoColor=white&labelColor=464646&style=for-the-badge)](https://github.com/KudoAI/chatgpt.js/commits/main)
46
- ![](https://img.shields.io/github/size/kudoai/chatgpt.js/dist/chatgpt.min.js?label=Minified%20Size&logo=databricks&logoColor=white&labelColor=464646&color=ff69b4&style=for-the-badge)
47
- [![](https://img.shields.io/codacy/grade/696917c8e5a949c49edb89ed2f43d5ba?label=Code+Quality&logo=codacy&logoColor=white&labelColor=464646&color=1acc6c&style=for-the-badge)](https://app.codacy.com/gh/KudoAI/chatgpt.js/commits?utm_source=chatgpt%2Ejs&utm_content=github_shield)
46
+ [![](https://img.shields.io/badge/License-MIT-green.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge)](https://github.com/KudoAI/chatgpt.js/blob/main/LICENSE.md)
47
+ [![](https://img.shields.io/github/commit-activity/m/KudoAI/chatgpt.js?label=Commits&logo=github&logoColor=white&labelColor=464646&style=for-the-badge)](https://github.com/KudoAI/chatgpt.js/commits/main)
48
+ ![](https://img.shields.io/github/size/KudoAI/chatgpt.js/dist/chatgpt.min.js?label=Minified%20Size&logo=databricks&logoColor=white&labelColor=464646&color=ff69b4&style=for-the-badge)
49
+ [![](https://img.shields.io/codefactor/grade/github/kudoai/chatgpt.js?label=Code+Quality&logo=codefactor&logoColor=white&labelColor=464646&color=1acc6c&style=for-the-badge)](https://www.codefactor.io/repository/github/kudoai/chatgpt.js)
48
50
  [![](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fsonarcloud.io%2Fapi%2Fmeasures%2Fcomponent%3Fcomponent%3Dkudoai_chatgpt.js%26metricKeys%3Dvulnerabilities&query=%24.component.measures.0.value&style=for-the-badge&logo=sonarcloud&logoColor=white&labelColor=464646&label=Vulnerabilities&color=gold)](https://sonarcloud.io/component_measures?metric=new_vulnerabilities&id=kudoai_chatgpt.js)
49
51
  [![](https://img.shields.io/badge/Mentioned_in-Awesome-cca8c4?logo=awesomelists&logoColor=white&labelColor=464646&style=for-the-badge)](https://github.com/sindresorhus/awesome-chatgpt#javascript)
50
52
  [![](https://img.shields.io/badge/Featured_on-Product_Hunt-ff6154?logo=producthunt&logoColor=white&labelColor=464646&style=for-the-badge)](https://www.producthunt.com/posts/chatgpt-js)
@@ -52,7 +54,7 @@
52
54
 
53
55
  </div>
54
56
 
55
- <img height=8px width="100%" src="https://raw.githubusercontent.com/kudoai/chatgpt.js/main/docs/assets/images/aqua-separator.png">
57
+ <img height=8px width="100%" src="https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/docs/assets/images/aqua-separator.png">
56
58
 
57
59
  <div id="intro">
58
60
 
@@ -67,7 +69,7 @@
67
69
  - Easy-to-use
68
70
  - Lightweight (yet optimally performant)
69
71
 
70
- <img height=8px width="100%" src="https://raw.githubusercontent.com/kudoai/chatgpt.js/main/docs/assets/images/aqua-separator.png">
72
+ <img height=8px width="100%" src="https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/docs/assets/images/aqua-separator.png">
71
73
 
72
74
  <div id="importing">
73
75
 
@@ -81,7 +83,7 @@
81
83
 
82
84
  ```js
83
85
  (async () => {
84
- await import('https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@2.6.7/dist/chatgpt.min.js');
86
+ await import('https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@2.6.8/dist/chatgpt.min.js');
85
87
  // Your code here...
86
88
  })();
87
89
  ```
@@ -90,7 +92,7 @@
90
92
 
91
93
  ```js
92
94
  var xhr = new XMLHttpRequest();
93
- xhr.open('GET', 'https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@2.6.7/dist/chatgpt.min.js');
95
+ xhr.open('GET', 'https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@2.6.8/dist/chatgpt.min.js');
94
96
  xhr.onload = function () {
95
97
  if (xhr.status === 200) {
96
98
  var chatgptJS = document.createElement('script');
@@ -106,13 +108,13 @@ function yourCode() {
106
108
  }
107
109
  ```
108
110
 
109
- ### <img style="margin: 0 2px -0.065rem 0" height=17 src="https://raw.githubusercontent.com/kudoai/chatgpt.js/main/starters/media/images/icons/tampermonkey-icon28.png"></picture><img style="margin: 0 2px -0.035rem 1px" height=17.5 src="https://raw.githubusercontent.com/kudoai/chatgpt.js/main/starters/media/images/icons/violentmonkey-icon100.png"> Greasemonkey:
111
+ ### <img style="margin: 0 2px -0.065rem 0" height=17 src="https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/starters/media/images/icons/tampermonkey-icon28.png"><img style="margin: 0 2px -0.035rem 1px" height=17.5 src="https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/starters/media/images/icons/violentmonkey-icon100.png"> Greasemonkey:
110
112
 
111
113
  > **Note** _To use a starter template: [kudoai/chatgpt.js-greasemonkey-starter](https://github.com/KudoAI/chatgpt.js-greasemonkey-starter)_
112
114
 
113
115
  ```js
114
116
  ...
115
- // @require https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@2.6.7/dist/chatgpt.min.js
117
+ // @require https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@2.6.8/dist/chatgpt.min.js
116
118
  // ==/UserScript==
117
119
 
118
120
  // Your code here...
@@ -124,7 +126,7 @@ function yourCode() {
124
126
 
125
127
  Since Google does not allow remote code, importing chatgpt.js locally is required:
126
128
 
127
- 1. Save https://raw.githubusercontent.com/kudoai/chatgpt.js/main/chatgpt.js to a subdirectory (`lib` in this example)
129
+ 1. Save https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/chatgpt.js to a subdirectory (`lib` in this example)
128
130
 
129
131
  2. Add ES6 export statement to end of `lib/chatgpt.js`
130
132
  ```js
@@ -148,7 +150,7 @@ export { chatgpt }
148
150
  })();
149
151
  ```
150
152
 
151
- <img height=8px width="100%" src="https://raw.githubusercontent.com/kudoai/chatgpt.js/main/docs/assets/images/aqua-separator.png">
153
+ <img height=8px width="100%" src="https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/docs/assets/images/aqua-separator.png">
152
154
 
153
155
  <div id="npm">
154
156
 
@@ -166,7 +168,7 @@ After installation, navigate to `node_modules/@kudoai/chatgpt.js` to find the li
166
168
 
167
169
  </div>
168
170
 
169
- <img height=8px width="100%" src="https://raw.githubusercontent.com/kudoai/chatgpt.js/main/docs/assets/images/aqua-separator.png">
171
+ <img height=8px width="100%" src="https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/docs/assets/images/aqua-separator.png">
170
172
 
171
173
  <div id="usage">
172
174
 
@@ -189,7 +191,7 @@ Each call equally fetches the last response. If you think it works, it probably
189
191
 
190
192
  If it didn't, check out the extended [userguide](https://github.com/KudoAI/chatgpt.js/blob/main/docs/USERGUIDE.md), or simply submit an [issue](https://github.com/KudoAI/chatgpt.js/issues) or [PR](https://github.com/KudoAI/chatgpt.js/pulls) and it will be integrated, ezpz!
191
193
 
192
- <img height=8px width="100%" src="https://raw.githubusercontent.com/kudoai/chatgpt.js/main/docs/assets/images/aqua-separator.png">
194
+ <img height=8px width="100%" src="https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/docs/assets/images/aqua-separator.png">
193
195
 
194
196
  <div id="showcase">
195
197
 
@@ -268,7 +270,7 @@ https://github.com/KudoAI/chatgpt.js/assets/10906554/f53c740f-d5e0-49b6-ae02-3b3
268
270
  If you've made something w/ chatgpt.js you want to share, email <a href="mailto:showcase@chatgptjs.org">showcase@chatgptjs.org</a> or just open a <a href="https://github.com/KudoAI/chatgpt.js/pulls" target="_blank" rel="noopener">pull request</a>!
269
271
  </p>
270
272
 
271
- <img height=8px width="100%" src="https://raw.githubusercontent.com/kudoai/chatgpt.js/main/docs/assets/images/aqua-separator.png">
273
+ <img height=8px width="100%" src="https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/docs/assets/images/aqua-separator.png">
272
274
 
273
275
  <div id="contributors">
274
276
 
@@ -305,12 +307,12 @@ This library exists thanks to code, translations, issues & ideas from the follow
305
307
  [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/111466842?first-contrib=2024.2.15-add-en-gb-locale&h=51&w=51&mask=circle&maxage=7d "@Luwa-Tech")](https://github.com/Luwa-Tech)
306
308
  [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/in/29110&h=51&w=51&mask=circle&maxage=7d "Dependabot")](https://github.com/dependabot)
307
309
  [![](https://images.weserv.nl/?url=https://i.imgur.com/tNyIPmG.jpg?h=51&w=51&mask=circle&maxage=7d "ChatGPT")](https://chat.openai.com)
308
- [![](https://images.weserv.nl/?url=https://raw.githubusercontent.com/kudoai/chatgpt.js/main/media/images/icons/poe-icon128.svg?first-contrib=2023.07.27-getandshowreply-method&h=51&w=51&mask=circle&maxage=7d "Poe")](https://poe.com)
310
+ [![](https://images.weserv.nl/?url=https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/media/images/icons/poe-icon128.svg?first-contrib=2023.07.27-getandshowreply-method&h=51&w=51&mask=circle&maxage=7d "Poe")](https://poe.com)
309
311
  [![](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/31427850?h=51&w=51&mask=circle&maxage=7d "@ImgBotApp")](https://github.com/ImgBotApp)
310
312
 
311
313
  </div><br>
312
314
 
313
- <img height=8px width="100%" src="https://raw.githubusercontent.com/kudoai/chatgpt.js/main/docs/assets/images/aqua-separator.png">
315
+ <img height=8px width="100%" src="https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/docs/assets/images/aqua-separator.png">
314
316
 
315
317
  <div id="partners">
316
318
 
@@ -323,15 +325,15 @@ This library exists thanks to code, translations, issues & ideas from the follow
323
325
  <div id="partners-collage" align="center">
324
326
 
325
327
  <picture>
326
- <source type="image/png" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/kudoai/chatgpt.js/main/media/images/logos/partners/collage/white.png">
327
- <img width=888 src="https://raw.githubusercontent.com/kudoai/chatgpt.js/main/media/images/logos/partners/collage/black.png">
328
+ <source type="image/png" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/media/images/logos/partners/collage/white.png">
329
+ <img width=888 src="https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/media/images/logos/partners/collage/black.png">
328
330
  </picture>
329
331
 
330
332
  </div>
331
333
 
332
334
  <br>
333
335
 
334
- <img height=8px width="100%" src="https://raw.githubusercontent.com/kudoai/chatgpt.js/main/docs/assets/images/aqua-separator.png">
336
+ <img height=8px width="100%" src="https://raw.githubusercontent.com/KudoAI/chatgpt.js/main/docs/assets/images/aqua-separator.png">
335
337
 
336
338
  <div align="center">
337
339