Spaces:
Paused
Paused
matt HOFFNER
commited on
Commit
·
29df9bc
1
Parent(s):
ae34ac2
cleanup
Browse files- next.config.js +8 -0
- package-lock.json +696 -11
- package.json +3 -1
- src/app/search/web/page.jsx +10 -6
- src/pages/api/llm.js +84 -0
- src/stream.js +105 -0
next.config.js
CHANGED
@@ -4,6 +4,14 @@ const nextConfig = {
|
|
4 |
appDir: true,
|
5 |
},
|
6 |
output: "standalone",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
images: {
|
8 |
domains: ["upload.wikimedia.org"],
|
9 |
},
|
|
|
4 |
appDir: true,
|
5 |
},
|
6 |
output: "standalone",
|
7 |
+
webpack(config, { isServer, dev }) {
|
8 |
+
config.experiments = {
|
9 |
+
asyncWebAssembly: true,
|
10 |
+
layers: true,
|
11 |
+
};
|
12 |
+
|
13 |
+
return config;
|
14 |
+
},
|
15 |
images: {
|
16 |
domains: ["upload.wikimedia.org"],
|
17 |
},
|
package-lock.json
CHANGED
@@ -8,6 +8,7 @@
|
|
8 |
"name": "google-clone-nextjs13",
|
9 |
"version": "0.1.0",
|
10 |
"dependencies": {
|
|
|
11 |
"@next/font": "13.1.6",
|
12 |
"eslint": "8.34.0",
|
13 |
"eslint-config-next": "13.1.6",
|
@@ -18,7 +19,8 @@
|
|
18 |
"react": "18.2.0",
|
19 |
"react-dom": "18.2.0",
|
20 |
"react-icons": "^4.7.1",
|
21 |
-
"react-markdown": "^8.0.7"
|
|
|
22 |
},
|
23 |
"devDependencies": {
|
24 |
"@types/node": "20.3.1",
|
@@ -39,6 +41,11 @@
|
|
39 |
"node": ">=6.9.0"
|
40 |
}
|
41 |
},
|
|
|
|
|
|
|
|
|
|
|
42 |
"node_modules/@eslint/eslintrc": {
|
43 |
"version": "1.4.1",
|
44 |
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz",
|
@@ -813,6 +820,25 @@
|
|
813 |
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
814 |
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
|
815 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
816 |
"node_modules/binary-extensions": {
|
817 |
"version": "2.2.0",
|
818 |
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
|
@@ -822,6 +848,16 @@
|
|
822 |
"node": ">=8"
|
823 |
}
|
824 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
825 |
"node_modules/brace-expansion": {
|
826 |
"version": "1.1.11",
|
827 |
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
@@ -870,6 +906,29 @@
|
|
870 |
"node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
|
871 |
}
|
872 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
873 |
"node_modules/call-bind": {
|
874 |
"version": "1.0.2",
|
875 |
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
|
@@ -977,11 +1036,28 @@
|
|
977 |
"node": ">= 6"
|
978 |
}
|
979 |
},
|
|
|
|
|
|
|
|
|
|
|
980 |
"node_modules/client-only": {
|
981 |
"version": "0.0.1",
|
982 |
"resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz",
|
983 |
"integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA=="
|
984 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
985 |
"node_modules/color-convert": {
|
986 |
"version": "2.0.1",
|
987 |
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
@@ -998,6 +1074,15 @@
|
|
998 |
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
999 |
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
|
1000 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1001 |
"node_modules/combined-stream": {
|
1002 |
"version": "1.0.8",
|
1003 |
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
@@ -1086,6 +1171,20 @@
|
|
1086 |
"url": "https://github.com/sponsors/wooorm"
|
1087 |
}
|
1088 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1089 |
"node_modules/deep-equal": {
|
1090 |
"version": "2.2.0",
|
1091 |
"resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.0.tgz",
|
@@ -1113,6 +1212,14 @@
|
|
1113 |
"url": "https://github.com/sponsors/ljharb"
|
1114 |
}
|
1115 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1116 |
"node_modules/deep-is": {
|
1117 |
"version": "0.1.4",
|
1118 |
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
|
@@ -1166,6 +1273,14 @@
|
|
1166 |
"node": ">=6"
|
1167 |
}
|
1168 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1169 |
"node_modules/detective": {
|
1170 |
"version": "5.2.1",
|
1171 |
"resolved": "https://registry.npmjs.org/detective/-/detective-5.2.1.tgz",
|
@@ -1287,6 +1402,14 @@
|
|
1287 |
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
|
1288 |
"integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="
|
1289 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1290 |
"node_modules/enhanced-resolve": {
|
1291 |
"version": "5.12.0",
|
1292 |
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz",
|
@@ -1880,6 +2003,14 @@
|
|
1880 |
"node": ">=14.18"
|
1881 |
}
|
1882 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1883 |
"node_modules/extend": {
|
1884 |
"version": "3.0.2",
|
1885 |
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
|
@@ -2041,6 +2172,11 @@
|
|
2041 |
"url": "https://www.patreon.com/infusion"
|
2042 |
}
|
2043 |
},
|
|
|
|
|
|
|
|
|
|
|
2044 |
"node_modules/fs.realpath": {
|
2045 |
"version": "1.0.0",
|
2046 |
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
@@ -2126,6 +2262,11 @@
|
|
2126 |
"url": "https://github.com/privatenumber/get-tsconfig?sponsor=1"
|
2127 |
}
|
2128 |
},
|
|
|
|
|
|
|
|
|
|
|
2129 |
"node_modules/glob": {
|
2130 |
"version": "7.1.7",
|
2131 |
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz",
|
@@ -2358,6 +2499,25 @@
|
|
2358 |
"entities": "^4.3.0"
|
2359 |
}
|
2360 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2361 |
"node_modules/ignore": {
|
2362 |
"version": "5.2.4",
|
2363 |
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
|
@@ -2403,6 +2563,11 @@
|
|
2403 |
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
2404 |
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
2405 |
},
|
|
|
|
|
|
|
|
|
|
|
2406 |
"node_modules/inline-style-parser": {
|
2407 |
"version": "0.1.1",
|
2408 |
"resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz",
|
@@ -2449,6 +2614,11 @@
|
|
2449 |
"url": "https://github.com/sponsors/ljharb"
|
2450 |
}
|
2451 |
},
|
|
|
|
|
|
|
|
|
|
|
2452 |
"node_modules/is-bigint": {
|
2453 |
"version": "1.0.4",
|
2454 |
"resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz",
|
@@ -3439,6 +3609,17 @@
|
|
3439 |
"node": ">= 0.6"
|
3440 |
}
|
3441 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3442 |
"node_modules/minimatch": {
|
3443 |
"version": "3.1.2",
|
3444 |
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
@@ -3458,6 +3639,11 @@
|
|
3458 |
"url": "https://github.com/sponsors/ljharb"
|
3459 |
}
|
3460 |
},
|
|
|
|
|
|
|
|
|
|
|
3461 |
"node_modules/mri": {
|
3462 |
"version": "1.2.0",
|
3463 |
"resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
|
@@ -3482,6 +3668,11 @@
|
|
3482 |
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
|
3483 |
}
|
3484 |
},
|
|
|
|
|
|
|
|
|
|
|
3485 |
"node_modules/natural-compare": {
|
3486 |
"version": "1.4.0",
|
3487 |
"resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
|
@@ -3561,6 +3752,22 @@
|
|
3561 |
"node": "^10 || ^12 || >=14"
|
3562 |
}
|
3563 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3564 |
"node_modules/node-releases": {
|
3565 |
"version": "2.0.10",
|
3566 |
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz",
|
@@ -3984,6 +4191,31 @@
|
|
3984 |
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
|
3985 |
"dev": true
|
3986 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3987 |
"node_modules/prelude-ls": {
|
3988 |
"version": "1.2.1",
|
3989 |
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
|
@@ -4011,6 +4243,15 @@
|
|
4011 |
"url": "https://github.com/sponsors/wooorm"
|
4012 |
}
|
4013 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4014 |
"node_modules/punycode": {
|
4015 |
"version": "2.3.0",
|
4016 |
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz",
|
@@ -4050,6 +4291,28 @@
|
|
4050 |
"url": "https://github.com/sponsors/sindresorhus"
|
4051 |
}
|
4052 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4053 |
"node_modules/react": {
|
4054 |
"version": "18.2.0",
|
4055 |
"resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz",
|
@@ -4135,6 +4398,19 @@
|
|
4135 |
"pify": "^2.3.0"
|
4136 |
}
|
4137 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4138 |
"node_modules/readdirp": {
|
4139 |
"version": "3.6.0",
|
4140 |
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
|
@@ -4288,6 +4564,25 @@
|
|
4288 |
"node": ">=6"
|
4289 |
}
|
4290 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4291 |
"node_modules/safe-regex-test": {
|
4292 |
"version": "1.0.0",
|
4293 |
"resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz",
|
@@ -4310,9 +4605,9 @@
|
|
4310 |
}
|
4311 |
},
|
4312 |
"node_modules/semver": {
|
4313 |
-
"version": "7.
|
4314 |
-
"resolved": "https://registry.npmjs.org/semver/-/semver-7.
|
4315 |
-
"integrity": "sha512-
|
4316 |
"dependencies": {
|
4317 |
"lru-cache": "^6.0.0"
|
4318 |
},
|
@@ -4323,6 +4618,28 @@
|
|
4323 |
"node": ">=10"
|
4324 |
}
|
4325 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4326 |
"node_modules/shebang-command": {
|
4327 |
"version": "2.0.0",
|
4328 |
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
@@ -4355,6 +4672,57 @@
|
|
4355 |
"url": "https://github.com/sponsors/ljharb"
|
4356 |
}
|
4357 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4358 |
"node_modules/slash": {
|
4359 |
"version": "3.0.0",
|
4360 |
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
|
@@ -4391,6 +4759,14 @@
|
|
4391 |
"node": ">= 0.4"
|
4392 |
}
|
4393 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4394 |
"node_modules/string.prototype.matchall": {
|
4395 |
"version": "4.0.8",
|
4396 |
"resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz",
|
@@ -4589,6 +4965,32 @@
|
|
4589 |
"node": ">=6"
|
4590 |
}
|
4591 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4592 |
"node_modules/text-table": {
|
4593 |
"version": "0.2.0",
|
4594 |
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
|
@@ -4667,6 +5069,17 @@
|
|
4667 |
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
4668 |
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
|
4669 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4670 |
"node_modules/type-check": {
|
4671 |
"version": "0.4.0",
|
4672 |
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
|
@@ -4856,8 +5269,7 @@
|
|
4856 |
"node_modules/util-deprecate": {
|
4857 |
"version": "1.0.2",
|
4858 |
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
4859 |
-
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
|
4860 |
-
"dev": true
|
4861 |
},
|
4862 |
"node_modules/uvu": {
|
4863 |
"version": "0.5.6",
|
@@ -5023,6 +5435,11 @@
|
|
5023 |
"regenerator-runtime": "^0.13.11"
|
5024 |
}
|
5025 |
},
|
|
|
|
|
|
|
|
|
|
|
5026 |
"@eslint/eslintrc": {
|
5027 |
"version": "1.4.1",
|
5028 |
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz",
|
@@ -5517,12 +5934,27 @@
|
|
5517 |
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
5518 |
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
|
5519 |
},
|
|
|
|
|
|
|
|
|
|
|
5520 |
"binary-extensions": {
|
5521 |
"version": "2.2.0",
|
5522 |
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
|
5523 |
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
|
5524 |
"dev": true
|
5525 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5526 |
"brace-expansion": {
|
5527 |
"version": "1.1.11",
|
5528 |
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
@@ -5552,6 +5984,15 @@
|
|
5552 |
"update-browserslist-db": "^1.0.10"
|
5553 |
}
|
5554 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5555 |
"call-bind": {
|
5556 |
"version": "1.0.2",
|
5557 |
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
|
@@ -5618,11 +6059,25 @@
|
|
5618 |
}
|
5619 |
}
|
5620 |
},
|
|
|
|
|
|
|
|
|
|
|
5621 |
"client-only": {
|
5622 |
"version": "0.0.1",
|
5623 |
"resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz",
|
5624 |
"integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA=="
|
5625 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5626 |
"color-convert": {
|
5627 |
"version": "2.0.1",
|
5628 |
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
@@ -5636,6 +6091,15 @@
|
|
5636 |
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
5637 |
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
|
5638 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5639 |
"combined-stream": {
|
5640 |
"version": "1.0.8",
|
5641 |
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
@@ -5696,6 +6160,14 @@
|
|
5696 |
"character-entities": "^2.0.0"
|
5697 |
}
|
5698 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5699 |
"deep-equal": {
|
5700 |
"version": "2.2.0",
|
5701 |
"resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.0.tgz",
|
@@ -5720,6 +6192,11 @@
|
|
5720 |
"which-typed-array": "^1.1.9"
|
5721 |
}
|
5722 |
},
|
|
|
|
|
|
|
|
|
|
|
5723 |
"deep-is": {
|
5724 |
"version": "0.1.4",
|
5725 |
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
|
@@ -5755,6 +6232,11 @@
|
|
5755 |
"resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
|
5756 |
"integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA=="
|
5757 |
},
|
|
|
|
|
|
|
|
|
|
|
5758 |
"detective": {
|
5759 |
"version": "5.2.1",
|
5760 |
"resolved": "https://registry.npmjs.org/detective/-/detective-5.2.1.tgz",
|
@@ -5843,6 +6325,14 @@
|
|
5843 |
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
|
5844 |
"integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="
|
5845 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5846 |
"enhanced-resolve": {
|
5847 |
"version": "5.12.0",
|
5848 |
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz",
|
@@ -6283,6 +6773,11 @@
|
|
6283 |
"resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-1.0.0.tgz",
|
6284 |
"integrity": "sha512-9jgfSCa3dmEme2ES3mPByGXfgZ87VbP97tng1G2nWwWx6bV2nYxm2AWCrbQjXToSe+yYlqaZNtxffR9IeQr95g=="
|
6285 |
},
|
|
|
|
|
|
|
|
|
|
|
6286 |
"extend": {
|
6287 |
"version": "3.0.2",
|
6288 |
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
|
@@ -6401,6 +6896,11 @@
|
|
6401 |
"integrity": "sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==",
|
6402 |
"dev": true
|
6403 |
},
|
|
|
|
|
|
|
|
|
|
|
6404 |
"fs.realpath": {
|
6405 |
"version": "1.0.0",
|
6406 |
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
@@ -6458,6 +6958,11 @@
|
|
6458 |
"resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.4.0.tgz",
|
6459 |
"integrity": "sha512-0Gdjo/9+FzsYhXCEFueo2aY1z1tpXrxWZzP7k8ul9qt1U5o8rYJwTJYmaeHdrVosYIVYkOy2iwCJ9FdpocJhPQ=="
|
6460 |
},
|
|
|
|
|
|
|
|
|
|
|
6461 |
"glob": {
|
6462 |
"version": "7.1.7",
|
6463 |
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz",
|
@@ -6616,6 +7121,11 @@
|
|
6616 |
"entities": "^4.3.0"
|
6617 |
}
|
6618 |
},
|
|
|
|
|
|
|
|
|
|
|
6619 |
"ignore": {
|
6620 |
"version": "5.2.4",
|
6621 |
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
|
@@ -6649,6 +7159,11 @@
|
|
6649 |
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
6650 |
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
6651 |
},
|
|
|
|
|
|
|
|
|
|
|
6652 |
"inline-style-parser": {
|
6653 |
"version": "0.1.1",
|
6654 |
"resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz",
|
@@ -6683,6 +7198,11 @@
|
|
6683 |
"is-typed-array": "^1.1.10"
|
6684 |
}
|
6685 |
},
|
|
|
|
|
|
|
|
|
|
|
6686 |
"is-bigint": {
|
6687 |
"version": "1.0.4",
|
6688 |
"resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz",
|
@@ -7273,6 +7793,11 @@
|
|
7273 |
"mime-db": "1.52.0"
|
7274 |
}
|
7275 |
},
|
|
|
|
|
|
|
|
|
|
|
7276 |
"minimatch": {
|
7277 |
"version": "3.1.2",
|
7278 |
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
@@ -7286,6 +7811,11 @@
|
|
7286 |
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
|
7287 |
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="
|
7288 |
},
|
|
|
|
|
|
|
|
|
|
|
7289 |
"mri": {
|
7290 |
"version": "1.2.0",
|
7291 |
"resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
|
@@ -7301,6 +7831,11 @@
|
|
7301 |
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
|
7302 |
"integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw=="
|
7303 |
},
|
|
|
|
|
|
|
|
|
|
|
7304 |
"natural-compare": {
|
7305 |
"version": "1.4.0",
|
7306 |
"resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
|
@@ -7343,6 +7878,19 @@
|
|
7343 |
}
|
7344 |
}
|
7345 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7346 |
"node-releases": {
|
7347 |
"version": "2.0.10",
|
7348 |
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz",
|
@@ -7612,6 +8160,25 @@
|
|
7612 |
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
|
7613 |
"dev": true
|
7614 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7615 |
"prelude-ls": {
|
7616 |
"version": "1.2.1",
|
7617 |
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
|
@@ -7632,6 +8199,15 @@
|
|
7632 |
"resolved": "https://registry.npmjs.org/property-information/-/property-information-6.2.0.tgz",
|
7633 |
"integrity": "sha512-kma4U7AFCTwpqq5twzC1YVIDXSqg6qQK6JN0smOw8fgRy1OkMi0CYSzFmsy6dnqSenamAtj0CyXMUJ1Mf6oROg=="
|
7634 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7635 |
"punycode": {
|
7636 |
"version": "2.3.0",
|
7637 |
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz",
|
@@ -7648,6 +8224,24 @@
|
|
7648 |
"integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==",
|
7649 |
"dev": true
|
7650 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7651 |
"react": {
|
7652 |
"version": "18.2.0",
|
7653 |
"resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz",
|
@@ -7719,6 +8313,16 @@
|
|
7719 |
"pify": "^2.3.0"
|
7720 |
}
|
7721 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7722 |
"readdirp": {
|
7723 |
"version": "3.6.0",
|
7724 |
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
|
@@ -7813,6 +8417,11 @@
|
|
7813 |
"mri": "^1.1.0"
|
7814 |
}
|
7815 |
},
|
|
|
|
|
|
|
|
|
|
|
7816 |
"safe-regex-test": {
|
7817 |
"version": "1.0.0",
|
7818 |
"resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz",
|
@@ -7832,13 +8441,28 @@
|
|
7832 |
}
|
7833 |
},
|
7834 |
"semver": {
|
7835 |
-
"version": "7.
|
7836 |
-
"resolved": "https://registry.npmjs.org/semver/-/semver-7.
|
7837 |
-
"integrity": "sha512-
|
7838 |
"requires": {
|
7839 |
"lru-cache": "^6.0.0"
|
7840 |
}
|
7841 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7842 |
"shebang-command": {
|
7843 |
"version": "2.0.0",
|
7844 |
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
@@ -7862,6 +8486,29 @@
|
|
7862 |
"object-inspect": "^1.9.0"
|
7863 |
}
|
7864 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7865 |
"slash": {
|
7866 |
"version": "3.0.0",
|
7867 |
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
|
@@ -7885,6 +8532,14 @@
|
|
7885 |
"internal-slot": "^1.0.4"
|
7886 |
}
|
7887 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7888 |
"string.prototype.matchall": {
|
7889 |
"version": "4.0.8",
|
7890 |
"resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz",
|
@@ -8020,6 +8675,29 @@
|
|
8020 |
"resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz",
|
8021 |
"integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ=="
|
8022 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8023 |
"text-table": {
|
8024 |
"version": "0.2.0",
|
8025 |
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
|
@@ -8083,6 +8761,14 @@
|
|
8083 |
}
|
8084 |
}
|
8085 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8086 |
"type-check": {
|
8087 |
"version": "0.4.0",
|
8088 |
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
|
@@ -8206,8 +8892,7 @@
|
|
8206 |
"util-deprecate": {
|
8207 |
"version": "1.0.2",
|
8208 |
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
8209 |
-
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
|
8210 |
-
"dev": true
|
8211 |
},
|
8212 |
"uvu": {
|
8213 |
"version": "0.5.6",
|
|
|
8 |
"name": "google-clone-nextjs13",
|
9 |
"version": "0.1.0",
|
10 |
"dependencies": {
|
11 |
+
"@dqbd/tiktoken": "^1.0.7",
|
12 |
"@next/font": "13.1.6",
|
13 |
"eslint": "8.34.0",
|
14 |
"eslint-config-next": "13.1.6",
|
|
|
19 |
"react": "18.2.0",
|
20 |
"react-dom": "18.2.0",
|
21 |
"react-icons": "^4.7.1",
|
22 |
+
"react-markdown": "^8.0.7",
|
23 |
+
"sharp": "^0.32.1"
|
24 |
},
|
25 |
"devDependencies": {
|
26 |
"@types/node": "20.3.1",
|
|
|
41 |
"node": ">=6.9.0"
|
42 |
}
|
43 |
},
|
44 |
+
"node_modules/@dqbd/tiktoken": {
|
45 |
+
"version": "1.0.7",
|
46 |
+
"resolved": "https://registry.npmjs.org/@dqbd/tiktoken/-/tiktoken-1.0.7.tgz",
|
47 |
+
"integrity": "sha512-bhR5k5W+8GLzysjk8zTMVygQZsgvf7W1F0IlL4ZQ5ugjo5rCyiwGM5d8DYriXspytfu98tv59niang3/T+FoDw=="
|
48 |
+
},
|
49 |
"node_modules/@eslint/eslintrc": {
|
50 |
"version": "1.4.1",
|
51 |
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz",
|
|
|
820 |
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
821 |
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
|
822 |
},
|
823 |
+
"node_modules/base64-js": {
|
824 |
+
"version": "1.5.1",
|
825 |
+
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
|
826 |
+
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
|
827 |
+
"funding": [
|
828 |
+
{
|
829 |
+
"type": "github",
|
830 |
+
"url": "https://github.com/sponsors/feross"
|
831 |
+
},
|
832 |
+
{
|
833 |
+
"type": "patreon",
|
834 |
+
"url": "https://www.patreon.com/feross"
|
835 |
+
},
|
836 |
+
{
|
837 |
+
"type": "consulting",
|
838 |
+
"url": "https://feross.org/support"
|
839 |
+
}
|
840 |
+
]
|
841 |
+
},
|
842 |
"node_modules/binary-extensions": {
|
843 |
"version": "2.2.0",
|
844 |
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
|
|
|
848 |
"node": ">=8"
|
849 |
}
|
850 |
},
|
851 |
+
"node_modules/bl": {
|
852 |
+
"version": "4.1.0",
|
853 |
+
"resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
|
854 |
+
"integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
|
855 |
+
"dependencies": {
|
856 |
+
"buffer": "^5.5.0",
|
857 |
+
"inherits": "^2.0.4",
|
858 |
+
"readable-stream": "^3.4.0"
|
859 |
+
}
|
860 |
+
},
|
861 |
"node_modules/brace-expansion": {
|
862 |
"version": "1.1.11",
|
863 |
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
|
|
906 |
"node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
|
907 |
}
|
908 |
},
|
909 |
+
"node_modules/buffer": {
|
910 |
+
"version": "5.7.1",
|
911 |
+
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
|
912 |
+
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
|
913 |
+
"funding": [
|
914 |
+
{
|
915 |
+
"type": "github",
|
916 |
+
"url": "https://github.com/sponsors/feross"
|
917 |
+
},
|
918 |
+
{
|
919 |
+
"type": "patreon",
|
920 |
+
"url": "https://www.patreon.com/feross"
|
921 |
+
},
|
922 |
+
{
|
923 |
+
"type": "consulting",
|
924 |
+
"url": "https://feross.org/support"
|
925 |
+
}
|
926 |
+
],
|
927 |
+
"dependencies": {
|
928 |
+
"base64-js": "^1.3.1",
|
929 |
+
"ieee754": "^1.1.13"
|
930 |
+
}
|
931 |
+
},
|
932 |
"node_modules/call-bind": {
|
933 |
"version": "1.0.2",
|
934 |
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
|
|
|
1036 |
"node": ">= 6"
|
1037 |
}
|
1038 |
},
|
1039 |
+
"node_modules/chownr": {
|
1040 |
+
"version": "1.1.4",
|
1041 |
+
"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
|
1042 |
+
"integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="
|
1043 |
+
},
|
1044 |
"node_modules/client-only": {
|
1045 |
"version": "0.0.1",
|
1046 |
"resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz",
|
1047 |
"integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA=="
|
1048 |
},
|
1049 |
+
"node_modules/color": {
|
1050 |
+
"version": "4.2.3",
|
1051 |
+
"resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz",
|
1052 |
+
"integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==",
|
1053 |
+
"dependencies": {
|
1054 |
+
"color-convert": "^2.0.1",
|
1055 |
+
"color-string": "^1.9.0"
|
1056 |
+
},
|
1057 |
+
"engines": {
|
1058 |
+
"node": ">=12.5.0"
|
1059 |
+
}
|
1060 |
+
},
|
1061 |
"node_modules/color-convert": {
|
1062 |
"version": "2.0.1",
|
1063 |
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
|
|
1074 |
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
1075 |
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
|
1076 |
},
|
1077 |
+
"node_modules/color-string": {
|
1078 |
+
"version": "1.9.1",
|
1079 |
+
"resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz",
|
1080 |
+
"integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==",
|
1081 |
+
"dependencies": {
|
1082 |
+
"color-name": "^1.0.0",
|
1083 |
+
"simple-swizzle": "^0.2.2"
|
1084 |
+
}
|
1085 |
+
},
|
1086 |
"node_modules/combined-stream": {
|
1087 |
"version": "1.0.8",
|
1088 |
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
|
|
1171 |
"url": "https://github.com/sponsors/wooorm"
|
1172 |
}
|
1173 |
},
|
1174 |
+
"node_modules/decompress-response": {
|
1175 |
+
"version": "6.0.0",
|
1176 |
+
"resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",
|
1177 |
+
"integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
|
1178 |
+
"dependencies": {
|
1179 |
+
"mimic-response": "^3.1.0"
|
1180 |
+
},
|
1181 |
+
"engines": {
|
1182 |
+
"node": ">=10"
|
1183 |
+
},
|
1184 |
+
"funding": {
|
1185 |
+
"url": "https://github.com/sponsors/sindresorhus"
|
1186 |
+
}
|
1187 |
+
},
|
1188 |
"node_modules/deep-equal": {
|
1189 |
"version": "2.2.0",
|
1190 |
"resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.0.tgz",
|
|
|
1212 |
"url": "https://github.com/sponsors/ljharb"
|
1213 |
}
|
1214 |
},
|
1215 |
+
"node_modules/deep-extend": {
|
1216 |
+
"version": "0.6.0",
|
1217 |
+
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
|
1218 |
+
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
|
1219 |
+
"engines": {
|
1220 |
+
"node": ">=4.0.0"
|
1221 |
+
}
|
1222 |
+
},
|
1223 |
"node_modules/deep-is": {
|
1224 |
"version": "0.1.4",
|
1225 |
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
|
|
|
1273 |
"node": ">=6"
|
1274 |
}
|
1275 |
},
|
1276 |
+
"node_modules/detect-libc": {
|
1277 |
+
"version": "2.0.1",
|
1278 |
+
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz",
|
1279 |
+
"integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==",
|
1280 |
+
"engines": {
|
1281 |
+
"node": ">=8"
|
1282 |
+
}
|
1283 |
+
},
|
1284 |
"node_modules/detective": {
|
1285 |
"version": "5.2.1",
|
1286 |
"resolved": "https://registry.npmjs.org/detective/-/detective-5.2.1.tgz",
|
|
|
1402 |
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
|
1403 |
"integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="
|
1404 |
},
|
1405 |
+
"node_modules/end-of-stream": {
|
1406 |
+
"version": "1.4.4",
|
1407 |
+
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
|
1408 |
+
"integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
|
1409 |
+
"dependencies": {
|
1410 |
+
"once": "^1.4.0"
|
1411 |
+
}
|
1412 |
+
},
|
1413 |
"node_modules/enhanced-resolve": {
|
1414 |
"version": "5.12.0",
|
1415 |
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz",
|
|
|
2003 |
"node": ">=14.18"
|
2004 |
}
|
2005 |
},
|
2006 |
+
"node_modules/expand-template": {
|
2007 |
+
"version": "2.0.3",
|
2008 |
+
"resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz",
|
2009 |
+
"integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==",
|
2010 |
+
"engines": {
|
2011 |
+
"node": ">=6"
|
2012 |
+
}
|
2013 |
+
},
|
2014 |
"node_modules/extend": {
|
2015 |
"version": "3.0.2",
|
2016 |
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
|
|
|
2172 |
"url": "https://www.patreon.com/infusion"
|
2173 |
}
|
2174 |
},
|
2175 |
+
"node_modules/fs-constants": {
|
2176 |
+
"version": "1.0.0",
|
2177 |
+
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
|
2178 |
+
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
|
2179 |
+
},
|
2180 |
"node_modules/fs.realpath": {
|
2181 |
"version": "1.0.0",
|
2182 |
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
|
|
2262 |
"url": "https://github.com/privatenumber/get-tsconfig?sponsor=1"
|
2263 |
}
|
2264 |
},
|
2265 |
+
"node_modules/github-from-package": {
|
2266 |
+
"version": "0.0.0",
|
2267 |
+
"resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz",
|
2268 |
+
"integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw=="
|
2269 |
+
},
|
2270 |
"node_modules/glob": {
|
2271 |
"version": "7.1.7",
|
2272 |
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz",
|
|
|
2499 |
"entities": "^4.3.0"
|
2500 |
}
|
2501 |
},
|
2502 |
+
"node_modules/ieee754": {
|
2503 |
+
"version": "1.2.1",
|
2504 |
+
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
|
2505 |
+
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
|
2506 |
+
"funding": [
|
2507 |
+
{
|
2508 |
+
"type": "github",
|
2509 |
+
"url": "https://github.com/sponsors/feross"
|
2510 |
+
},
|
2511 |
+
{
|
2512 |
+
"type": "patreon",
|
2513 |
+
"url": "https://www.patreon.com/feross"
|
2514 |
+
},
|
2515 |
+
{
|
2516 |
+
"type": "consulting",
|
2517 |
+
"url": "https://feross.org/support"
|
2518 |
+
}
|
2519 |
+
]
|
2520 |
+
},
|
2521 |
"node_modules/ignore": {
|
2522 |
"version": "5.2.4",
|
2523 |
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
|
|
|
2563 |
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
2564 |
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
2565 |
},
|
2566 |
+
"node_modules/ini": {
|
2567 |
+
"version": "1.3.8",
|
2568 |
+
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
|
2569 |
+
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
|
2570 |
+
},
|
2571 |
"node_modules/inline-style-parser": {
|
2572 |
"version": "0.1.1",
|
2573 |
"resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz",
|
|
|
2614 |
"url": "https://github.com/sponsors/ljharb"
|
2615 |
}
|
2616 |
},
|
2617 |
+
"node_modules/is-arrayish": {
|
2618 |
+
"version": "0.3.2",
|
2619 |
+
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz",
|
2620 |
+
"integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ=="
|
2621 |
+
},
|
2622 |
"node_modules/is-bigint": {
|
2623 |
"version": "1.0.4",
|
2624 |
"resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz",
|
|
|
3609 |
"node": ">= 0.6"
|
3610 |
}
|
3611 |
},
|
3612 |
+
"node_modules/mimic-response": {
|
3613 |
+
"version": "3.1.0",
|
3614 |
+
"resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",
|
3615 |
+
"integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",
|
3616 |
+
"engines": {
|
3617 |
+
"node": ">=10"
|
3618 |
+
},
|
3619 |
+
"funding": {
|
3620 |
+
"url": "https://github.com/sponsors/sindresorhus"
|
3621 |
+
}
|
3622 |
+
},
|
3623 |
"node_modules/minimatch": {
|
3624 |
"version": "3.1.2",
|
3625 |
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
|
|
3639 |
"url": "https://github.com/sponsors/ljharb"
|
3640 |
}
|
3641 |
},
|
3642 |
+
"node_modules/mkdirp-classic": {
|
3643 |
+
"version": "0.5.3",
|
3644 |
+
"resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
|
3645 |
+
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A=="
|
3646 |
+
},
|
3647 |
"node_modules/mri": {
|
3648 |
"version": "1.2.0",
|
3649 |
"resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
|
|
|
3668 |
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
|
3669 |
}
|
3670 |
},
|
3671 |
+
"node_modules/napi-build-utils": {
|
3672 |
+
"version": "1.0.2",
|
3673 |
+
"resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz",
|
3674 |
+
"integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg=="
|
3675 |
+
},
|
3676 |
"node_modules/natural-compare": {
|
3677 |
"version": "1.4.0",
|
3678 |
"resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
|
|
|
3752 |
"node": "^10 || ^12 || >=14"
|
3753 |
}
|
3754 |
},
|
3755 |
+
"node_modules/node-abi": {
|
3756 |
+
"version": "3.45.0",
|
3757 |
+
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.45.0.tgz",
|
3758 |
+
"integrity": "sha512-iwXuFrMAcFVi/ZoZiqq8BzAdsLw9kxDfTC0HMyjXfSL/6CSDAGD5UmR7azrAgWV1zKYq7dUUMj4owusBWKLsiQ==",
|
3759 |
+
"dependencies": {
|
3760 |
+
"semver": "^7.3.5"
|
3761 |
+
},
|
3762 |
+
"engines": {
|
3763 |
+
"node": ">=10"
|
3764 |
+
}
|
3765 |
+
},
|
3766 |
+
"node_modules/node-addon-api": {
|
3767 |
+
"version": "6.1.0",
|
3768 |
+
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz",
|
3769 |
+
"integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA=="
|
3770 |
+
},
|
3771 |
"node_modules/node-releases": {
|
3772 |
"version": "2.0.10",
|
3773 |
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz",
|
|
|
4191 |
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
|
4192 |
"dev": true
|
4193 |
},
|
4194 |
+
"node_modules/prebuild-install": {
|
4195 |
+
"version": "7.1.1",
|
4196 |
+
"resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz",
|
4197 |
+
"integrity": "sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==",
|
4198 |
+
"dependencies": {
|
4199 |
+
"detect-libc": "^2.0.0",
|
4200 |
+
"expand-template": "^2.0.3",
|
4201 |
+
"github-from-package": "0.0.0",
|
4202 |
+
"minimist": "^1.2.3",
|
4203 |
+
"mkdirp-classic": "^0.5.3",
|
4204 |
+
"napi-build-utils": "^1.0.1",
|
4205 |
+
"node-abi": "^3.3.0",
|
4206 |
+
"pump": "^3.0.0",
|
4207 |
+
"rc": "^1.2.7",
|
4208 |
+
"simple-get": "^4.0.0",
|
4209 |
+
"tar-fs": "^2.0.0",
|
4210 |
+
"tunnel-agent": "^0.6.0"
|
4211 |
+
},
|
4212 |
+
"bin": {
|
4213 |
+
"prebuild-install": "bin.js"
|
4214 |
+
},
|
4215 |
+
"engines": {
|
4216 |
+
"node": ">=10"
|
4217 |
+
}
|
4218 |
+
},
|
4219 |
"node_modules/prelude-ls": {
|
4220 |
"version": "1.2.1",
|
4221 |
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
|
|
|
4243 |
"url": "https://github.com/sponsors/wooorm"
|
4244 |
}
|
4245 |
},
|
4246 |
+
"node_modules/pump": {
|
4247 |
+
"version": "3.0.0",
|
4248 |
+
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
|
4249 |
+
"integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
|
4250 |
+
"dependencies": {
|
4251 |
+
"end-of-stream": "^1.1.0",
|
4252 |
+
"once": "^1.3.1"
|
4253 |
+
}
|
4254 |
+
},
|
4255 |
"node_modules/punycode": {
|
4256 |
"version": "2.3.0",
|
4257 |
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz",
|
|
|
4291 |
"url": "https://github.com/sponsors/sindresorhus"
|
4292 |
}
|
4293 |
},
|
4294 |
+
"node_modules/rc": {
|
4295 |
+
"version": "1.2.8",
|
4296 |
+
"resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
|
4297 |
+
"integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
|
4298 |
+
"dependencies": {
|
4299 |
+
"deep-extend": "^0.6.0",
|
4300 |
+
"ini": "~1.3.0",
|
4301 |
+
"minimist": "^1.2.0",
|
4302 |
+
"strip-json-comments": "~2.0.1"
|
4303 |
+
},
|
4304 |
+
"bin": {
|
4305 |
+
"rc": "cli.js"
|
4306 |
+
}
|
4307 |
+
},
|
4308 |
+
"node_modules/rc/node_modules/strip-json-comments": {
|
4309 |
+
"version": "2.0.1",
|
4310 |
+
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
|
4311 |
+
"integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==",
|
4312 |
+
"engines": {
|
4313 |
+
"node": ">=0.10.0"
|
4314 |
+
}
|
4315 |
+
},
|
4316 |
"node_modules/react": {
|
4317 |
"version": "18.2.0",
|
4318 |
"resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz",
|
|
|
4398 |
"pify": "^2.3.0"
|
4399 |
}
|
4400 |
},
|
4401 |
+
"node_modules/readable-stream": {
|
4402 |
+
"version": "3.6.2",
|
4403 |
+
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
|
4404 |
+
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
|
4405 |
+
"dependencies": {
|
4406 |
+
"inherits": "^2.0.3",
|
4407 |
+
"string_decoder": "^1.1.1",
|
4408 |
+
"util-deprecate": "^1.0.1"
|
4409 |
+
},
|
4410 |
+
"engines": {
|
4411 |
+
"node": ">= 6"
|
4412 |
+
}
|
4413 |
+
},
|
4414 |
"node_modules/readdirp": {
|
4415 |
"version": "3.6.0",
|
4416 |
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
|
|
|
4564 |
"node": ">=6"
|
4565 |
}
|
4566 |
},
|
4567 |
+
"node_modules/safe-buffer": {
|
4568 |
+
"version": "5.2.1",
|
4569 |
+
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
4570 |
+
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
|
4571 |
+
"funding": [
|
4572 |
+
{
|
4573 |
+
"type": "github",
|
4574 |
+
"url": "https://github.com/sponsors/feross"
|
4575 |
+
},
|
4576 |
+
{
|
4577 |
+
"type": "patreon",
|
4578 |
+
"url": "https://www.patreon.com/feross"
|
4579 |
+
},
|
4580 |
+
{
|
4581 |
+
"type": "consulting",
|
4582 |
+
"url": "https://feross.org/support"
|
4583 |
+
}
|
4584 |
+
]
|
4585 |
+
},
|
4586 |
"node_modules/safe-regex-test": {
|
4587 |
"version": "1.0.0",
|
4588 |
"resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz",
|
|
|
4605 |
}
|
4606 |
},
|
4607 |
"node_modules/semver": {
|
4608 |
+
"version": "7.5.2",
|
4609 |
+
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz",
|
4610 |
+
"integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==",
|
4611 |
"dependencies": {
|
4612 |
"lru-cache": "^6.0.0"
|
4613 |
},
|
|
|
4618 |
"node": ">=10"
|
4619 |
}
|
4620 |
},
|
4621 |
+
"node_modules/sharp": {
|
4622 |
+
"version": "0.32.1",
|
4623 |
+
"resolved": "https://registry.npmjs.org/sharp/-/sharp-0.32.1.tgz",
|
4624 |
+
"integrity": "sha512-kQTFtj7ldpUqSe8kDxoGLZc1rnMFU0AO2pqbX6pLy3b7Oj8ivJIdoKNwxHVQG2HN6XpHPJqCSM2nsma2gOXvOg==",
|
4625 |
+
"hasInstallScript": true,
|
4626 |
+
"dependencies": {
|
4627 |
+
"color": "^4.2.3",
|
4628 |
+
"detect-libc": "^2.0.1",
|
4629 |
+
"node-addon-api": "^6.1.0",
|
4630 |
+
"prebuild-install": "^7.1.1",
|
4631 |
+
"semver": "^7.5.0",
|
4632 |
+
"simple-get": "^4.0.1",
|
4633 |
+
"tar-fs": "^2.1.1",
|
4634 |
+
"tunnel-agent": "^0.6.0"
|
4635 |
+
},
|
4636 |
+
"engines": {
|
4637 |
+
"node": ">=14.15.0"
|
4638 |
+
},
|
4639 |
+
"funding": {
|
4640 |
+
"url": "https://opencollective.com/libvips"
|
4641 |
+
}
|
4642 |
+
},
|
4643 |
"node_modules/shebang-command": {
|
4644 |
"version": "2.0.0",
|
4645 |
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
|
|
4672 |
"url": "https://github.com/sponsors/ljharb"
|
4673 |
}
|
4674 |
},
|
4675 |
+
"node_modules/simple-concat": {
|
4676 |
+
"version": "1.0.1",
|
4677 |
+
"resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",
|
4678 |
+
"integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==",
|
4679 |
+
"funding": [
|
4680 |
+
{
|
4681 |
+
"type": "github",
|
4682 |
+
"url": "https://github.com/sponsors/feross"
|
4683 |
+
},
|
4684 |
+
{
|
4685 |
+
"type": "patreon",
|
4686 |
+
"url": "https://www.patreon.com/feross"
|
4687 |
+
},
|
4688 |
+
{
|
4689 |
+
"type": "consulting",
|
4690 |
+
"url": "https://feross.org/support"
|
4691 |
+
}
|
4692 |
+
]
|
4693 |
+
},
|
4694 |
+
"node_modules/simple-get": {
|
4695 |
+
"version": "4.0.1",
|
4696 |
+
"resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz",
|
4697 |
+
"integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==",
|
4698 |
+
"funding": [
|
4699 |
+
{
|
4700 |
+
"type": "github",
|
4701 |
+
"url": "https://github.com/sponsors/feross"
|
4702 |
+
},
|
4703 |
+
{
|
4704 |
+
"type": "patreon",
|
4705 |
+
"url": "https://www.patreon.com/feross"
|
4706 |
+
},
|
4707 |
+
{
|
4708 |
+
"type": "consulting",
|
4709 |
+
"url": "https://feross.org/support"
|
4710 |
+
}
|
4711 |
+
],
|
4712 |
+
"dependencies": {
|
4713 |
+
"decompress-response": "^6.0.0",
|
4714 |
+
"once": "^1.3.1",
|
4715 |
+
"simple-concat": "^1.0.0"
|
4716 |
+
}
|
4717 |
+
},
|
4718 |
+
"node_modules/simple-swizzle": {
|
4719 |
+
"version": "0.2.2",
|
4720 |
+
"resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
|
4721 |
+
"integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==",
|
4722 |
+
"dependencies": {
|
4723 |
+
"is-arrayish": "^0.3.1"
|
4724 |
+
}
|
4725 |
+
},
|
4726 |
"node_modules/slash": {
|
4727 |
"version": "3.0.0",
|
4728 |
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
|
|
|
4759 |
"node": ">= 0.4"
|
4760 |
}
|
4761 |
},
|
4762 |
+
"node_modules/string_decoder": {
|
4763 |
+
"version": "1.3.0",
|
4764 |
+
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
|
4765 |
+
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
|
4766 |
+
"dependencies": {
|
4767 |
+
"safe-buffer": "~5.2.0"
|
4768 |
+
}
|
4769 |
+
},
|
4770 |
"node_modules/string.prototype.matchall": {
|
4771 |
"version": "4.0.8",
|
4772 |
"resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz",
|
|
|
4965 |
"node": ">=6"
|
4966 |
}
|
4967 |
},
|
4968 |
+
"node_modules/tar-fs": {
|
4969 |
+
"version": "2.1.1",
|
4970 |
+
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz",
|
4971 |
+
"integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==",
|
4972 |
+
"dependencies": {
|
4973 |
+
"chownr": "^1.1.1",
|
4974 |
+
"mkdirp-classic": "^0.5.2",
|
4975 |
+
"pump": "^3.0.0",
|
4976 |
+
"tar-stream": "^2.1.4"
|
4977 |
+
}
|
4978 |
+
},
|
4979 |
+
"node_modules/tar-stream": {
|
4980 |
+
"version": "2.2.0",
|
4981 |
+
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",
|
4982 |
+
"integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
|
4983 |
+
"dependencies": {
|
4984 |
+
"bl": "^4.0.3",
|
4985 |
+
"end-of-stream": "^1.4.1",
|
4986 |
+
"fs-constants": "^1.0.0",
|
4987 |
+
"inherits": "^2.0.3",
|
4988 |
+
"readable-stream": "^3.1.1"
|
4989 |
+
},
|
4990 |
+
"engines": {
|
4991 |
+
"node": ">=6"
|
4992 |
+
}
|
4993 |
+
},
|
4994 |
"node_modules/text-table": {
|
4995 |
"version": "0.2.0",
|
4996 |
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
|
|
|
5069 |
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
5070 |
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
|
5071 |
},
|
5072 |
+
"node_modules/tunnel-agent": {
|
5073 |
+
"version": "0.6.0",
|
5074 |
+
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
|
5075 |
+
"integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==",
|
5076 |
+
"dependencies": {
|
5077 |
+
"safe-buffer": "^5.0.1"
|
5078 |
+
},
|
5079 |
+
"engines": {
|
5080 |
+
"node": "*"
|
5081 |
+
}
|
5082 |
+
},
|
5083 |
"node_modules/type-check": {
|
5084 |
"version": "0.4.0",
|
5085 |
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
|
|
|
5269 |
"node_modules/util-deprecate": {
|
5270 |
"version": "1.0.2",
|
5271 |
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
5272 |
+
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
|
|
|
5273 |
},
|
5274 |
"node_modules/uvu": {
|
5275 |
"version": "0.5.6",
|
|
|
5435 |
"regenerator-runtime": "^0.13.11"
|
5436 |
}
|
5437 |
},
|
5438 |
+
"@dqbd/tiktoken": {
|
5439 |
+
"version": "1.0.7",
|
5440 |
+
"resolved": "https://registry.npmjs.org/@dqbd/tiktoken/-/tiktoken-1.0.7.tgz",
|
5441 |
+
"integrity": "sha512-bhR5k5W+8GLzysjk8zTMVygQZsgvf7W1F0IlL4ZQ5ugjo5rCyiwGM5d8DYriXspytfu98tv59niang3/T+FoDw=="
|
5442 |
+
},
|
5443 |
"@eslint/eslintrc": {
|
5444 |
"version": "1.4.1",
|
5445 |
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz",
|
|
|
5934 |
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
5935 |
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
|
5936 |
},
|
5937 |
+
"base64-js": {
|
5938 |
+
"version": "1.5.1",
|
5939 |
+
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
|
5940 |
+
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
|
5941 |
+
},
|
5942 |
"binary-extensions": {
|
5943 |
"version": "2.2.0",
|
5944 |
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
|
5945 |
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
|
5946 |
"dev": true
|
5947 |
},
|
5948 |
+
"bl": {
|
5949 |
+
"version": "4.1.0",
|
5950 |
+
"resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
|
5951 |
+
"integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
|
5952 |
+
"requires": {
|
5953 |
+
"buffer": "^5.5.0",
|
5954 |
+
"inherits": "^2.0.4",
|
5955 |
+
"readable-stream": "^3.4.0"
|
5956 |
+
}
|
5957 |
+
},
|
5958 |
"brace-expansion": {
|
5959 |
"version": "1.1.11",
|
5960 |
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
|
|
5984 |
"update-browserslist-db": "^1.0.10"
|
5985 |
}
|
5986 |
},
|
5987 |
+
"buffer": {
|
5988 |
+
"version": "5.7.1",
|
5989 |
+
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
|
5990 |
+
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
|
5991 |
+
"requires": {
|
5992 |
+
"base64-js": "^1.3.1",
|
5993 |
+
"ieee754": "^1.1.13"
|
5994 |
+
}
|
5995 |
+
},
|
5996 |
"call-bind": {
|
5997 |
"version": "1.0.2",
|
5998 |
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
|
|
|
6059 |
}
|
6060 |
}
|
6061 |
},
|
6062 |
+
"chownr": {
|
6063 |
+
"version": "1.1.4",
|
6064 |
+
"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
|
6065 |
+
"integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="
|
6066 |
+
},
|
6067 |
"client-only": {
|
6068 |
"version": "0.0.1",
|
6069 |
"resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz",
|
6070 |
"integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA=="
|
6071 |
},
|
6072 |
+
"color": {
|
6073 |
+
"version": "4.2.3",
|
6074 |
+
"resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz",
|
6075 |
+
"integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==",
|
6076 |
+
"requires": {
|
6077 |
+
"color-convert": "^2.0.1",
|
6078 |
+
"color-string": "^1.9.0"
|
6079 |
+
}
|
6080 |
+
},
|
6081 |
"color-convert": {
|
6082 |
"version": "2.0.1",
|
6083 |
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
|
|
6091 |
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
6092 |
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
|
6093 |
},
|
6094 |
+
"color-string": {
|
6095 |
+
"version": "1.9.1",
|
6096 |
+
"resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz",
|
6097 |
+
"integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==",
|
6098 |
+
"requires": {
|
6099 |
+
"color-name": "^1.0.0",
|
6100 |
+
"simple-swizzle": "^0.2.2"
|
6101 |
+
}
|
6102 |
+
},
|
6103 |
"combined-stream": {
|
6104 |
"version": "1.0.8",
|
6105 |
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
|
|
6160 |
"character-entities": "^2.0.0"
|
6161 |
}
|
6162 |
},
|
6163 |
+
"decompress-response": {
|
6164 |
+
"version": "6.0.0",
|
6165 |
+
"resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",
|
6166 |
+
"integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
|
6167 |
+
"requires": {
|
6168 |
+
"mimic-response": "^3.1.0"
|
6169 |
+
}
|
6170 |
+
},
|
6171 |
"deep-equal": {
|
6172 |
"version": "2.2.0",
|
6173 |
"resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.0.tgz",
|
|
|
6192 |
"which-typed-array": "^1.1.9"
|
6193 |
}
|
6194 |
},
|
6195 |
+
"deep-extend": {
|
6196 |
+
"version": "0.6.0",
|
6197 |
+
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
|
6198 |
+
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA=="
|
6199 |
+
},
|
6200 |
"deep-is": {
|
6201 |
"version": "0.1.4",
|
6202 |
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
|
|
|
6232 |
"resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
|
6233 |
"integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA=="
|
6234 |
},
|
6235 |
+
"detect-libc": {
|
6236 |
+
"version": "2.0.1",
|
6237 |
+
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz",
|
6238 |
+
"integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w=="
|
6239 |
+
},
|
6240 |
"detective": {
|
6241 |
"version": "5.2.1",
|
6242 |
"resolved": "https://registry.npmjs.org/detective/-/detective-5.2.1.tgz",
|
|
|
6325 |
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
|
6326 |
"integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="
|
6327 |
},
|
6328 |
+
"end-of-stream": {
|
6329 |
+
"version": "1.4.4",
|
6330 |
+
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
|
6331 |
+
"integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
|
6332 |
+
"requires": {
|
6333 |
+
"once": "^1.4.0"
|
6334 |
+
}
|
6335 |
+
},
|
6336 |
"enhanced-resolve": {
|
6337 |
"version": "5.12.0",
|
6338 |
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz",
|
|
|
6773 |
"resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-1.0.0.tgz",
|
6774 |
"integrity": "sha512-9jgfSCa3dmEme2ES3mPByGXfgZ87VbP97tng1G2nWwWx6bV2nYxm2AWCrbQjXToSe+yYlqaZNtxffR9IeQr95g=="
|
6775 |
},
|
6776 |
+
"expand-template": {
|
6777 |
+
"version": "2.0.3",
|
6778 |
+
"resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz",
|
6779 |
+
"integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg=="
|
6780 |
+
},
|
6781 |
"extend": {
|
6782 |
"version": "3.0.2",
|
6783 |
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
|
|
|
6896 |
"integrity": "sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==",
|
6897 |
"dev": true
|
6898 |
},
|
6899 |
+
"fs-constants": {
|
6900 |
+
"version": "1.0.0",
|
6901 |
+
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
|
6902 |
+
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
|
6903 |
+
},
|
6904 |
"fs.realpath": {
|
6905 |
"version": "1.0.0",
|
6906 |
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
|
|
6958 |
"resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.4.0.tgz",
|
6959 |
"integrity": "sha512-0Gdjo/9+FzsYhXCEFueo2aY1z1tpXrxWZzP7k8ul9qt1U5o8rYJwTJYmaeHdrVosYIVYkOy2iwCJ9FdpocJhPQ=="
|
6960 |
},
|
6961 |
+
"github-from-package": {
|
6962 |
+
"version": "0.0.0",
|
6963 |
+
"resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz",
|
6964 |
+
"integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw=="
|
6965 |
+
},
|
6966 |
"glob": {
|
6967 |
"version": "7.1.7",
|
6968 |
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz",
|
|
|
7121 |
"entities": "^4.3.0"
|
7122 |
}
|
7123 |
},
|
7124 |
+
"ieee754": {
|
7125 |
+
"version": "1.2.1",
|
7126 |
+
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
|
7127 |
+
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
|
7128 |
+
},
|
7129 |
"ignore": {
|
7130 |
"version": "5.2.4",
|
7131 |
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
|
|
|
7159 |
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
7160 |
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
7161 |
},
|
7162 |
+
"ini": {
|
7163 |
+
"version": "1.3.8",
|
7164 |
+
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
|
7165 |
+
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
|
7166 |
+
},
|
7167 |
"inline-style-parser": {
|
7168 |
"version": "0.1.1",
|
7169 |
"resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz",
|
|
|
7198 |
"is-typed-array": "^1.1.10"
|
7199 |
}
|
7200 |
},
|
7201 |
+
"is-arrayish": {
|
7202 |
+
"version": "0.3.2",
|
7203 |
+
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz",
|
7204 |
+
"integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ=="
|
7205 |
+
},
|
7206 |
"is-bigint": {
|
7207 |
"version": "1.0.4",
|
7208 |
"resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz",
|
|
|
7793 |
"mime-db": "1.52.0"
|
7794 |
}
|
7795 |
},
|
7796 |
+
"mimic-response": {
|
7797 |
+
"version": "3.1.0",
|
7798 |
+
"resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",
|
7799 |
+
"integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ=="
|
7800 |
+
},
|
7801 |
"minimatch": {
|
7802 |
"version": "3.1.2",
|
7803 |
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
|
|
7811 |
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
|
7812 |
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="
|
7813 |
},
|
7814 |
+
"mkdirp-classic": {
|
7815 |
+
"version": "0.5.3",
|
7816 |
+
"resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
|
7817 |
+
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A=="
|
7818 |
+
},
|
7819 |
"mri": {
|
7820 |
"version": "1.2.0",
|
7821 |
"resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
|
|
|
7831 |
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
|
7832 |
"integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw=="
|
7833 |
},
|
7834 |
+
"napi-build-utils": {
|
7835 |
+
"version": "1.0.2",
|
7836 |
+
"resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz",
|
7837 |
+
"integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg=="
|
7838 |
+
},
|
7839 |
"natural-compare": {
|
7840 |
"version": "1.4.0",
|
7841 |
"resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
|
|
|
7878 |
}
|
7879 |
}
|
7880 |
},
|
7881 |
+
"node-abi": {
|
7882 |
+
"version": "3.45.0",
|
7883 |
+
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.45.0.tgz",
|
7884 |
+
"integrity": "sha512-iwXuFrMAcFVi/ZoZiqq8BzAdsLw9kxDfTC0HMyjXfSL/6CSDAGD5UmR7azrAgWV1zKYq7dUUMj4owusBWKLsiQ==",
|
7885 |
+
"requires": {
|
7886 |
+
"semver": "^7.3.5"
|
7887 |
+
}
|
7888 |
+
},
|
7889 |
+
"node-addon-api": {
|
7890 |
+
"version": "6.1.0",
|
7891 |
+
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz",
|
7892 |
+
"integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA=="
|
7893 |
+
},
|
7894 |
"node-releases": {
|
7895 |
"version": "2.0.10",
|
7896 |
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz",
|
|
|
8160 |
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
|
8161 |
"dev": true
|
8162 |
},
|
8163 |
+
"prebuild-install": {
|
8164 |
+
"version": "7.1.1",
|
8165 |
+
"resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz",
|
8166 |
+
"integrity": "sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==",
|
8167 |
+
"requires": {
|
8168 |
+
"detect-libc": "^2.0.0",
|
8169 |
+
"expand-template": "^2.0.3",
|
8170 |
+
"github-from-package": "0.0.0",
|
8171 |
+
"minimist": "^1.2.3",
|
8172 |
+
"mkdirp-classic": "^0.5.3",
|
8173 |
+
"napi-build-utils": "^1.0.1",
|
8174 |
+
"node-abi": "^3.3.0",
|
8175 |
+
"pump": "^3.0.0",
|
8176 |
+
"rc": "^1.2.7",
|
8177 |
+
"simple-get": "^4.0.0",
|
8178 |
+
"tar-fs": "^2.0.0",
|
8179 |
+
"tunnel-agent": "^0.6.0"
|
8180 |
+
}
|
8181 |
+
},
|
8182 |
"prelude-ls": {
|
8183 |
"version": "1.2.1",
|
8184 |
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
|
|
|
8199 |
"resolved": "https://registry.npmjs.org/property-information/-/property-information-6.2.0.tgz",
|
8200 |
"integrity": "sha512-kma4U7AFCTwpqq5twzC1YVIDXSqg6qQK6JN0smOw8fgRy1OkMi0CYSzFmsy6dnqSenamAtj0CyXMUJ1Mf6oROg=="
|
8201 |
},
|
8202 |
+
"pump": {
|
8203 |
+
"version": "3.0.0",
|
8204 |
+
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
|
8205 |
+
"integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
|
8206 |
+
"requires": {
|
8207 |
+
"end-of-stream": "^1.1.0",
|
8208 |
+
"once": "^1.3.1"
|
8209 |
+
}
|
8210 |
+
},
|
8211 |
"punycode": {
|
8212 |
"version": "2.3.0",
|
8213 |
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz",
|
|
|
8224 |
"integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==",
|
8225 |
"dev": true
|
8226 |
},
|
8227 |
+
"rc": {
|
8228 |
+
"version": "1.2.8",
|
8229 |
+
"resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
|
8230 |
+
"integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
|
8231 |
+
"requires": {
|
8232 |
+
"deep-extend": "^0.6.0",
|
8233 |
+
"ini": "~1.3.0",
|
8234 |
+
"minimist": "^1.2.0",
|
8235 |
+
"strip-json-comments": "~2.0.1"
|
8236 |
+
},
|
8237 |
+
"dependencies": {
|
8238 |
+
"strip-json-comments": {
|
8239 |
+
"version": "2.0.1",
|
8240 |
+
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
|
8241 |
+
"integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ=="
|
8242 |
+
}
|
8243 |
+
}
|
8244 |
+
},
|
8245 |
"react": {
|
8246 |
"version": "18.2.0",
|
8247 |
"resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz",
|
|
|
8313 |
"pify": "^2.3.0"
|
8314 |
}
|
8315 |
},
|
8316 |
+
"readable-stream": {
|
8317 |
+
"version": "3.6.2",
|
8318 |
+
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
|
8319 |
+
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
|
8320 |
+
"requires": {
|
8321 |
+
"inherits": "^2.0.3",
|
8322 |
+
"string_decoder": "^1.1.1",
|
8323 |
+
"util-deprecate": "^1.0.1"
|
8324 |
+
}
|
8325 |
+
},
|
8326 |
"readdirp": {
|
8327 |
"version": "3.6.0",
|
8328 |
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
|
|
|
8417 |
"mri": "^1.1.0"
|
8418 |
}
|
8419 |
},
|
8420 |
+
"safe-buffer": {
|
8421 |
+
"version": "5.2.1",
|
8422 |
+
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
8423 |
+
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
|
8424 |
+
},
|
8425 |
"safe-regex-test": {
|
8426 |
"version": "1.0.0",
|
8427 |
"resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz",
|
|
|
8441 |
}
|
8442 |
},
|
8443 |
"semver": {
|
8444 |
+
"version": "7.5.2",
|
8445 |
+
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz",
|
8446 |
+
"integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==",
|
8447 |
"requires": {
|
8448 |
"lru-cache": "^6.0.0"
|
8449 |
}
|
8450 |
},
|
8451 |
+
"sharp": {
|
8452 |
+
"version": "0.32.1",
|
8453 |
+
"resolved": "https://registry.npmjs.org/sharp/-/sharp-0.32.1.tgz",
|
8454 |
+
"integrity": "sha512-kQTFtj7ldpUqSe8kDxoGLZc1rnMFU0AO2pqbX6pLy3b7Oj8ivJIdoKNwxHVQG2HN6XpHPJqCSM2nsma2gOXvOg==",
|
8455 |
+
"requires": {
|
8456 |
+
"color": "^4.2.3",
|
8457 |
+
"detect-libc": "^2.0.1",
|
8458 |
+
"node-addon-api": "^6.1.0",
|
8459 |
+
"prebuild-install": "^7.1.1",
|
8460 |
+
"semver": "^7.5.0",
|
8461 |
+
"simple-get": "^4.0.1",
|
8462 |
+
"tar-fs": "^2.1.1",
|
8463 |
+
"tunnel-agent": "^0.6.0"
|
8464 |
+
}
|
8465 |
+
},
|
8466 |
"shebang-command": {
|
8467 |
"version": "2.0.0",
|
8468 |
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
|
|
8486 |
"object-inspect": "^1.9.0"
|
8487 |
}
|
8488 |
},
|
8489 |
+
"simple-concat": {
|
8490 |
+
"version": "1.0.1",
|
8491 |
+
"resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",
|
8492 |
+
"integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q=="
|
8493 |
+
},
|
8494 |
+
"simple-get": {
|
8495 |
+
"version": "4.0.1",
|
8496 |
+
"resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz",
|
8497 |
+
"integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==",
|
8498 |
+
"requires": {
|
8499 |
+
"decompress-response": "^6.0.0",
|
8500 |
+
"once": "^1.3.1",
|
8501 |
+
"simple-concat": "^1.0.0"
|
8502 |
+
}
|
8503 |
+
},
|
8504 |
+
"simple-swizzle": {
|
8505 |
+
"version": "0.2.2",
|
8506 |
+
"resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
|
8507 |
+
"integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==",
|
8508 |
+
"requires": {
|
8509 |
+
"is-arrayish": "^0.3.1"
|
8510 |
+
}
|
8511 |
+
},
|
8512 |
"slash": {
|
8513 |
"version": "3.0.0",
|
8514 |
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
|
|
|
8532 |
"internal-slot": "^1.0.4"
|
8533 |
}
|
8534 |
},
|
8535 |
+
"string_decoder": {
|
8536 |
+
"version": "1.3.0",
|
8537 |
+
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
|
8538 |
+
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
|
8539 |
+
"requires": {
|
8540 |
+
"safe-buffer": "~5.2.0"
|
8541 |
+
}
|
8542 |
+
},
|
8543 |
"string.prototype.matchall": {
|
8544 |
"version": "4.0.8",
|
8545 |
"resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz",
|
|
|
8675 |
"resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz",
|
8676 |
"integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ=="
|
8677 |
},
|
8678 |
+
"tar-fs": {
|
8679 |
+
"version": "2.1.1",
|
8680 |
+
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz",
|
8681 |
+
"integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==",
|
8682 |
+
"requires": {
|
8683 |
+
"chownr": "^1.1.1",
|
8684 |
+
"mkdirp-classic": "^0.5.2",
|
8685 |
+
"pump": "^3.0.0",
|
8686 |
+
"tar-stream": "^2.1.4"
|
8687 |
+
}
|
8688 |
+
},
|
8689 |
+
"tar-stream": {
|
8690 |
+
"version": "2.2.0",
|
8691 |
+
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",
|
8692 |
+
"integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
|
8693 |
+
"requires": {
|
8694 |
+
"bl": "^4.0.3",
|
8695 |
+
"end-of-stream": "^1.4.1",
|
8696 |
+
"fs-constants": "^1.0.0",
|
8697 |
+
"inherits": "^2.0.3",
|
8698 |
+
"readable-stream": "^3.1.1"
|
8699 |
+
}
|
8700 |
+
},
|
8701 |
"text-table": {
|
8702 |
"version": "0.2.0",
|
8703 |
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
|
|
|
8761 |
}
|
8762 |
}
|
8763 |
},
|
8764 |
+
"tunnel-agent": {
|
8765 |
+
"version": "0.6.0",
|
8766 |
+
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
|
8767 |
+
"integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==",
|
8768 |
+
"requires": {
|
8769 |
+
"safe-buffer": "^5.0.1"
|
8770 |
+
}
|
8771 |
+
},
|
8772 |
"type-check": {
|
8773 |
"version": "0.4.0",
|
8774 |
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
|
|
|
8892 |
"util-deprecate": {
|
8893 |
"version": "1.0.2",
|
8894 |
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
8895 |
+
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
|
|
|
8896 |
},
|
8897 |
"uvu": {
|
8898 |
"version": "0.5.6",
|
package.json
CHANGED
@@ -9,6 +9,7 @@
|
|
9 |
"lint": "next lint"
|
10 |
},
|
11 |
"dependencies": {
|
|
|
12 |
"@next/font": "13.1.6",
|
13 |
"eslint": "8.34.0",
|
14 |
"eslint-config-next": "13.1.6",
|
@@ -19,7 +20,8 @@
|
|
19 |
"react": "18.2.0",
|
20 |
"react-dom": "18.2.0",
|
21 |
"react-icons": "^4.7.1",
|
22 |
-
"react-markdown": "^8.0.7"
|
|
|
23 |
},
|
24 |
"devDependencies": {
|
25 |
"@types/node": "20.3.1",
|
|
|
9 |
"lint": "next lint"
|
10 |
},
|
11 |
"dependencies": {
|
12 |
+
"@dqbd/tiktoken": "^1.0.7",
|
13 |
"@next/font": "13.1.6",
|
14 |
"eslint": "8.34.0",
|
15 |
"eslint-config-next": "13.1.6",
|
|
|
20 |
"react": "18.2.0",
|
21 |
"react-dom": "18.2.0",
|
22 |
"react-icons": "^4.7.1",
|
23 |
+
"react-markdown": "^8.0.7",
|
24 |
+
"sharp": "^0.32.1"
|
25 |
},
|
26 |
"devDependencies": {
|
27 |
"@types/node": "20.3.1",
|
src/app/search/web/page.jsx
CHANGED
@@ -4,8 +4,6 @@ import openai from 'openai';
|
|
4 |
import WebSearchResults from "@/components/WebSearchResults";
|
5 |
import Link from "next/link";
|
6 |
|
7 |
-
openai.setApiKey(process.env.OPENAI_API_KEY);
|
8 |
-
|
9 |
export default function WebSearchPage({ searchParams }) {
|
10 |
const [results, setResults] = useState(null);
|
11 |
const [aiResponse, setAiResponse] = useState(null);
|
@@ -27,12 +25,18 @@ export default function WebSearchPage({ searchParams }) {
|
|
27 |
|
28 |
const aiPrompt = `You're creating a search engine experience. You got the following search results for the term "${searchParams.searchTerm}": ${JSON.stringify(data.items)}. How can you present these results in a helpful way?`;
|
29 |
|
30 |
-
const
|
31 |
-
|
32 |
-
|
|
|
|
|
|
|
33 |
});
|
34 |
|
35 |
-
|
|
|
|
|
|
|
36 |
}
|
37 |
|
38 |
fetchData();
|
|
|
4 |
import WebSearchResults from "@/components/WebSearchResults";
|
5 |
import Link from "next/link";
|
6 |
|
|
|
|
|
7 |
export default function WebSearchPage({ searchParams }) {
|
8 |
const [results, setResults] = useState(null);
|
9 |
const [aiResponse, setAiResponse] = useState(null);
|
|
|
25 |
|
26 |
const aiPrompt = `You're creating a search engine experience. You got the following search results for the term "${searchParams.searchTerm}": ${JSON.stringify(data.items)}. How can you present these results in a helpful way?`;
|
27 |
|
28 |
+
const openaiRes = new EventSource('/api/llm', {
|
29 |
+
method: 'POST',
|
30 |
+
headers: {
|
31 |
+
'Content-Type': 'application/json',
|
32 |
+
},
|
33 |
+
body: JSON.stringify({ aiPrompt }),
|
34 |
});
|
35 |
|
36 |
+
openaiRes.onmessage = function(event) {
|
37 |
+
setAiResponse(aiResponse => aiResponse + event.data);
|
38 |
+
};
|
39 |
+
|
40 |
}
|
41 |
|
42 |
fetchData();
|
src/pages/api/llm.js
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { OpenAIError, OpenAIStream } from '../../stream';
|
2 |
+
import wasm from '../../../node_modules/@dqbd/tiktoken/lite/tiktoken_bg.wasm?module';
|
3 |
+
import tiktokenModel from '@dqbd/tiktoken/encoders/cl100k_base.json';
|
4 |
+
import { Tiktoken, init } from '@dqbd/tiktoken/lite/init';
|
5 |
+
|
6 |
+
export const DEFAULT_SYSTEM_PROMPT =
|
7 |
+
process.env.NEXT_PUBLIC_DEFAULT_SYSTEM_PROMPT ||
|
8 |
+
"You are ChatGPT, a large language model trained by OpenAI. Follow the user's instructions carefully. Respond using markdown.";
|
9 |
+
|
10 |
+
export const OPENAI_API_HOST =
|
11 |
+
process.env.OPENAI_API_HOST || 'https://api.openai.com';
|
12 |
+
|
13 |
+
export const DEFAULT_TEMPERATURE =
|
14 |
+
parseFloat(process.env.NEXT_PUBLIC_DEFAULT_TEMPERATURE || "1");
|
15 |
+
|
16 |
+
export const OPENAI_API_TYPE =
|
17 |
+
process.env.OPENAI_API_TYPE || 'openai';
|
18 |
+
|
19 |
+
export const OPENAI_API_VERSION =
|
20 |
+
process.env.OPENAI_API_VERSION || '2023-03-15-preview';
|
21 |
+
|
22 |
+
export const OPENAI_ORGANIZATION =
|
23 |
+
process.env.OPENAI_ORGANIZATION || '';
|
24 |
+
|
25 |
+
export const AZURE_DEPLOYMENT_ID =
|
26 |
+
process.env.AZURE_DEPLOYMENT_ID || '';
|
27 |
+
|
28 |
+
export const config = {
|
29 |
+
runtime: 'edge',
|
30 |
+
};
|
31 |
+
|
32 |
+
const handler = async (req) => {
|
33 |
+
try {
|
34 |
+
const { model, messages, key, prompt, temperature } = (await req.json());
|
35 |
+
|
36 |
+
await init((imports) => WebAssembly.instantiate(wasm, imports));
|
37 |
+
const encoding = new Tiktoken(
|
38 |
+
tiktokenModel.bpe_ranks,
|
39 |
+
tiktokenModel.special_tokens,
|
40 |
+
tiktokenModel.pat_str,
|
41 |
+
);
|
42 |
+
|
43 |
+
let promptToSend = prompt;
|
44 |
+
if (!promptToSend) {
|
45 |
+
promptToSend = DEFAULT_SYSTEM_PROMPT;
|
46 |
+
}
|
47 |
+
|
48 |
+
let temperatureToUse = temperature;
|
49 |
+
if (temperatureToUse == null) {
|
50 |
+
temperatureToUse = DEFAULT_TEMPERATURE;
|
51 |
+
}
|
52 |
+
|
53 |
+
const prompt_tokens = encoding.encode(promptToSend);
|
54 |
+
|
55 |
+
let tokenCount = prompt_tokens.length;
|
56 |
+
let messagesToSend = [];
|
57 |
+
|
58 |
+
for (let i = messages.length - 1; i >= 0; i--) {
|
59 |
+
const message = messages[i];
|
60 |
+
const tokens = encoding.encode(message.content);
|
61 |
+
|
62 |
+
if (tokenCount + tokens.length + 1000 > model.tokenLimit) {
|
63 |
+
break;
|
64 |
+
}
|
65 |
+
tokenCount += tokens.length;
|
66 |
+
messagesToSend = [message, ...messagesToSend];
|
67 |
+
}
|
68 |
+
|
69 |
+
encoding.free();
|
70 |
+
|
71 |
+
const stream = await OpenAIStream(model, promptToSend, temperatureToUse, key, messagesToSend);
|
72 |
+
|
73 |
+
return new Response(stream);
|
74 |
+
} catch (error) {
|
75 |
+
console.error(error);
|
76 |
+
if (error instanceof OpenAIError) {
|
77 |
+
return new Response('Error', { status: 500, statusText: error.message });
|
78 |
+
} else {
|
79 |
+
return new Response('Error', { status: 500 });
|
80 |
+
}
|
81 |
+
}
|
82 |
+
};
|
83 |
+
|
84 |
+
export default handler;
|
src/stream.js
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { AZURE_DEPLOYMENT_ID, OPENAI_API_HOST, OPENAI_API_TYPE, OPENAI_API_VERSION, OPENAI_ORGANIZATION } from './pages/api/llm';
|
2 |
+
import { createParser } from 'eventsource-parser';
|
3 |
+
|
4 |
+
export class OpenAIError extends Error {
|
5 |
+
constructor(message, type, param, code) {
|
6 |
+
super(message);
|
7 |
+
this.name = 'OpenAIError';
|
8 |
+
this.type = type;
|
9 |
+
this.param = param;
|
10 |
+
this.code = code;
|
11 |
+
}
|
12 |
+
}
|
13 |
+
|
14 |
+
export const OpenAIStream = async (
|
15 |
+
model,
|
16 |
+
systemPrompt,
|
17 |
+
temperature,
|
18 |
+
key,
|
19 |
+
messages
|
20 |
+
) => {
|
21 |
+
let url = `${OPENAI_API_HOST}/v1/chat/completions`;
|
22 |
+
if (OPENAI_API_TYPE === 'azure') {
|
23 |
+
url = `${OPENAI_API_HOST}/openai/deployments/${AZURE_DEPLOYMENT_ID}/chat/completions?api-version=${OPENAI_API_VERSION}`;
|
24 |
+
}
|
25 |
+
const res = await fetch(url, {
|
26 |
+
headers: {
|
27 |
+
'Content-Type': 'application/json',
|
28 |
+
...(OPENAI_API_TYPE === 'openai' && {
|
29 |
+
Authorization: `Bearer ${key ? key : process.env.OPENAI_API_KEY}`
|
30 |
+
}),
|
31 |
+
...(OPENAI_API_TYPE === 'azure' && {
|
32 |
+
'api-key': `${key ? key : process.env.OPENAI_API_KEY}`
|
33 |
+
}),
|
34 |
+
...((OPENAI_API_TYPE === 'openai' && OPENAI_ORGANIZATION) && {
|
35 |
+
'OpenAI-Organization': OPENAI_ORGANIZATION,
|
36 |
+
}),
|
37 |
+
},
|
38 |
+
method: 'POST',
|
39 |
+
body: JSON.stringify({
|
40 |
+
...(OPENAI_API_TYPE === 'openai' && {model: model.id}),
|
41 |
+
messages: [
|
42 |
+
{
|
43 |
+
role: 'system',
|
44 |
+
content: systemPrompt,
|
45 |
+
},
|
46 |
+
...messages,
|
47 |
+
],
|
48 |
+
max_tokens: 1000,
|
49 |
+
temperature: temperature,
|
50 |
+
stream: true,
|
51 |
+
}),
|
52 |
+
});
|
53 |
+
|
54 |
+
const encoder = new TextEncoder();
|
55 |
+
const decoder = new TextDecoder();
|
56 |
+
|
57 |
+
if (res.status !== 200) {
|
58 |
+
const result = await res.json();
|
59 |
+
if (result.error) {
|
60 |
+
throw new OpenAIError(
|
61 |
+
result.error.message,
|
62 |
+
result.error.type,
|
63 |
+
result.error.param,
|
64 |
+
result.error.code,
|
65 |
+
);
|
66 |
+
} else {
|
67 |
+
throw new Error(
|
68 |
+
`OpenAI API returned an error: ${
|
69 |
+
decoder.decode(result?.value) || result.statusText
|
70 |
+
}`,
|
71 |
+
);
|
72 |
+
}
|
73 |
+
}
|
74 |
+
|
75 |
+
const stream = new ReadableStream({
|
76 |
+
async start(controller) {
|
77 |
+
const onParse = (event) => {
|
78 |
+
if (event.type === 'event') {
|
79 |
+
const data = event.data;
|
80 |
+
|
81 |
+
try {
|
82 |
+
const json = JSON.parse(data);
|
83 |
+
if (json.choices[0].finish_reason != null) {
|
84 |
+
controller.close();
|
85 |
+
return;
|
86 |
+
}
|
87 |
+
const text = json.choices[0].delta.content;
|
88 |
+
const queue = encoder.encode(text);
|
89 |
+
controller.enqueue(queue);
|
90 |
+
} catch (e) {
|
91 |
+
controller.error(e);
|
92 |
+
}
|
93 |
+
}
|
94 |
+
};
|
95 |
+
|
96 |
+
const parser = createParser(onParse);
|
97 |
+
|
98 |
+
for await (const chunk of res.body) {
|
99 |
+
parser.feed(decoder.decode(chunk));
|
100 |
+
}
|
101 |
+
},
|
102 |
+
});
|
103 |
+
|
104 |
+
return stream;
|
105 |
+
};
|