Spaces:
Sleeping
Sleeping
ausername-12345 commited on
Commit ·
908eb88
1
Parent(s): 66a8b59
Switch to OpenAI SDK with IPAI_SK endpoint
Browse files- README.md +11 -0
- package-lock.json +240 -312
- package.json +1 -2
- server.js +21 -47
- src/rememberit.jsx +1 -1
README.md
CHANGED
|
@@ -6,3 +6,14 @@ colorTo: blue
|
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
---
|
| 9 |
+
|
| 10 |
+
# Remember It
|
| 11 |
+
|
| 12 |
+
Describe any item in plain language — we'll identify it and find where to buy it.
|
| 13 |
+
|
| 14 |
+
## Setup
|
| 15 |
+
|
| 16 |
+
1. Get a free API key from [console.groq.com](https://console.groq.com)
|
| 17 |
+
2. Add it as a **Space secret** named `GROQ_API_KEY`:
|
| 18 |
+
- Go to your Space → **Settings** → **Repository Secrets**
|
| 19 |
+
3. Push — the app will use Groq (Llama 3 70B) + web search for identification
|
package-lock.json
CHANGED
|
@@ -8,10 +8,9 @@
|
|
| 8 |
"name": "rememberit",
|
| 9 |
"version": "1.0.0",
|
| 10 |
"dependencies": {
|
| 11 |
-
"@huggingface/inference": "^4.13.18",
|
| 12 |
-
"cheerio": "^1.2.0",
|
| 13 |
"express": "^4.18.2",
|
| 14 |
"lucide-react": "^0.454.0",
|
|
|
|
| 15 |
"react": "^18.3.1",
|
| 16 |
"react-dom": "^18.3.1"
|
| 17 |
},
|
|
@@ -693,34 +692,6 @@
|
|
| 693 |
"node": ">=12"
|
| 694 |
}
|
| 695 |
},
|
| 696 |
-
"node_modules/@huggingface/inference": {
|
| 697 |
-
"version": "4.13.18",
|
| 698 |
-
"resolved": "https://registry.npmjs.org/@huggingface/inference/-/inference-4.13.18.tgz",
|
| 699 |
-
"integrity": "sha512-n0dP3FhmIqJoLU5yGoG6lBZVW50+IgeLDubLL1P28zG4Adp2rhKYQGt5j52JCwlmKDf2ruWjuIcfrjkobT0RlQ==",
|
| 700 |
-
"license": "MIT",
|
| 701 |
-
"dependencies": {
|
| 702 |
-
"@huggingface/jinja": "^0.5.9",
|
| 703 |
-
"@huggingface/tasks": "^0.21.1"
|
| 704 |
-
},
|
| 705 |
-
"engines": {
|
| 706 |
-
"node": ">=18"
|
| 707 |
-
}
|
| 708 |
-
},
|
| 709 |
-
"node_modules/@huggingface/jinja": {
|
| 710 |
-
"version": "0.5.9",
|
| 711 |
-
"resolved": "https://registry.npmjs.org/@huggingface/jinja/-/jinja-0.5.9.tgz",
|
| 712 |
-
"integrity": "sha512-uWTG+l3VJRsl7EXxYizuL3P+cCPoc3cRqbWWRcQN0FhejRfbdq0RNhCmbY/YDtnTcz9icdLYuLDjsnz4d8JMuw==",
|
| 713 |
-
"license": "MIT",
|
| 714 |
-
"engines": {
|
| 715 |
-
"node": ">=18"
|
| 716 |
-
}
|
| 717 |
-
},
|
| 718 |
-
"node_modules/@huggingface/tasks": {
|
| 719 |
-
"version": "0.21.4",
|
| 720 |
-
"resolved": "https://registry.npmjs.org/@huggingface/tasks/-/tasks-0.21.4.tgz",
|
| 721 |
-
"integrity": "sha512-h5JmwB0JktlmmLkeKLeAoCnc0IcJbu7oED3bCwHEzem1cj/JXMyhSKFs/KayqCYXAnhK569Sqs+COHspoRQIew==",
|
| 722 |
-
"license": "MIT"
|
| 723 |
-
},
|
| 724 |
"node_modules/@jridgewell/gen-mapping": {
|
| 725 |
"version": "0.3.13",
|
| 726 |
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",
|
|
@@ -1180,6 +1151,25 @@
|
|
| 1180 |
"dev": true,
|
| 1181 |
"license": "MIT"
|
| 1182 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1183 |
"node_modules/@vitejs/plugin-react": {
|
| 1184 |
"version": "4.7.0",
|
| 1185 |
"resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.7.0.tgz",
|
|
@@ -1201,6 +1191,18 @@
|
|
| 1201 |
"vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0"
|
| 1202 |
}
|
| 1203 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1204 |
"node_modules/accepts": {
|
| 1205 |
"version": "1.3.8",
|
| 1206 |
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
|
|
@@ -1214,12 +1216,30 @@
|
|
| 1214 |
"node": ">= 0.6"
|
| 1215 |
}
|
| 1216 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1217 |
"node_modules/array-flatten": {
|
| 1218 |
"version": "1.1.1",
|
| 1219 |
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
|
| 1220 |
"integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==",
|
| 1221 |
"license": "MIT"
|
| 1222 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1223 |
"node_modules/baseline-browser-mapping": {
|
| 1224 |
"version": "2.10.33",
|
| 1225 |
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.33.tgz",
|
|
@@ -1272,12 +1292,6 @@
|
|
| 1272 |
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
|
| 1273 |
"license": "MIT"
|
| 1274 |
},
|
| 1275 |
-
"node_modules/boolbase": {
|
| 1276 |
-
"version": "1.0.0",
|
| 1277 |
-
"resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
|
| 1278 |
-
"integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==",
|
| 1279 |
-
"license": "ISC"
|
| 1280 |
-
},
|
| 1281 |
"node_modules/browserslist": {
|
| 1282 |
"version": "4.28.2",
|
| 1283 |
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz",
|
|
@@ -1371,46 +1385,16 @@
|
|
| 1371 |
],
|
| 1372 |
"license": "CC-BY-4.0"
|
| 1373 |
},
|
| 1374 |
-
"node_modules/
|
| 1375 |
-
"version": "1.
|
| 1376 |
-
"resolved": "https://registry.npmjs.org/
|
| 1377 |
-
"integrity": "sha512-
|
| 1378 |
"license": "MIT",
|
| 1379 |
"dependencies": {
|
| 1380 |
-
"
|
| 1381 |
-
"dom-serializer": "^2.0.0",
|
| 1382 |
-
"domhandler": "^5.0.3",
|
| 1383 |
-
"domutils": "^3.2.2",
|
| 1384 |
-
"encoding-sniffer": "^0.2.1",
|
| 1385 |
-
"htmlparser2": "^10.1.0",
|
| 1386 |
-
"parse5": "^7.3.0",
|
| 1387 |
-
"parse5-htmlparser2-tree-adapter": "^7.1.0",
|
| 1388 |
-
"parse5-parser-stream": "^7.1.2",
|
| 1389 |
-
"undici": "^7.19.0",
|
| 1390 |
-
"whatwg-mimetype": "^4.0.0"
|
| 1391 |
},
|
| 1392 |
"engines": {
|
| 1393 |
-
"node": ">=
|
| 1394 |
-
},
|
| 1395 |
-
"funding": {
|
| 1396 |
-
"url": "https://github.com/cheeriojs/cheerio?sponsor=1"
|
| 1397 |
-
}
|
| 1398 |
-
},
|
| 1399 |
-
"node_modules/cheerio-select": {
|
| 1400 |
-
"version": "2.1.0",
|
| 1401 |
-
"resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz",
|
| 1402 |
-
"integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==",
|
| 1403 |
-
"license": "BSD-2-Clause",
|
| 1404 |
-
"dependencies": {
|
| 1405 |
-
"boolbase": "^1.0.0",
|
| 1406 |
-
"css-select": "^5.1.0",
|
| 1407 |
-
"css-what": "^6.1.0",
|
| 1408 |
-
"domelementtype": "^2.3.0",
|
| 1409 |
-
"domhandler": "^5.0.3",
|
| 1410 |
-
"domutils": "^3.0.1"
|
| 1411 |
-
},
|
| 1412 |
-
"funding": {
|
| 1413 |
-
"url": "https://github.com/sponsors/fb55"
|
| 1414 |
}
|
| 1415 |
},
|
| 1416 |
"node_modules/content-disposition": {
|
|
@@ -1456,34 +1440,6 @@
|
|
| 1456 |
"integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==",
|
| 1457 |
"license": "MIT"
|
| 1458 |
},
|
| 1459 |
-
"node_modules/css-select": {
|
| 1460 |
-
"version": "5.2.2",
|
| 1461 |
-
"resolved": "https://registry.npmjs.org/css-select/-/css-select-5.2.2.tgz",
|
| 1462 |
-
"integrity": "sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw==",
|
| 1463 |
-
"license": "BSD-2-Clause",
|
| 1464 |
-
"dependencies": {
|
| 1465 |
-
"boolbase": "^1.0.0",
|
| 1466 |
-
"css-what": "^6.1.0",
|
| 1467 |
-
"domhandler": "^5.0.2",
|
| 1468 |
-
"domutils": "^3.0.1",
|
| 1469 |
-
"nth-check": "^2.0.1"
|
| 1470 |
-
},
|
| 1471 |
-
"funding": {
|
| 1472 |
-
"url": "https://github.com/sponsors/fb55"
|
| 1473 |
-
}
|
| 1474 |
-
},
|
| 1475 |
-
"node_modules/css-what": {
|
| 1476 |
-
"version": "6.2.2",
|
| 1477 |
-
"resolved": "https://registry.npmjs.org/css-what/-/css-what-6.2.2.tgz",
|
| 1478 |
-
"integrity": "sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA==",
|
| 1479 |
-
"license": "BSD-2-Clause",
|
| 1480 |
-
"engines": {
|
| 1481 |
-
"node": ">= 6"
|
| 1482 |
-
},
|
| 1483 |
-
"funding": {
|
| 1484 |
-
"url": "https://github.com/sponsors/fb55"
|
| 1485 |
-
}
|
| 1486 |
-
},
|
| 1487 |
"node_modules/debug": {
|
| 1488 |
"version": "4.4.3",
|
| 1489 |
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
|
|
@@ -1502,6 +1458,15 @@
|
|
| 1502 |
}
|
| 1503 |
}
|
| 1504 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1505 |
"node_modules/depd": {
|
| 1506 |
"version": "2.0.0",
|
| 1507 |
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
|
|
@@ -1521,61 +1486,6 @@
|
|
| 1521 |
"npm": "1.2.8000 || >= 1.4.16"
|
| 1522 |
}
|
| 1523 |
},
|
| 1524 |
-
"node_modules/dom-serializer": {
|
| 1525 |
-
"version": "2.0.0",
|
| 1526 |
-
"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz",
|
| 1527 |
-
"integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==",
|
| 1528 |
-
"license": "MIT",
|
| 1529 |
-
"dependencies": {
|
| 1530 |
-
"domelementtype": "^2.3.0",
|
| 1531 |
-
"domhandler": "^5.0.2",
|
| 1532 |
-
"entities": "^4.2.0"
|
| 1533 |
-
},
|
| 1534 |
-
"funding": {
|
| 1535 |
-
"url": "https://github.com/cheeriojs/dom-serializer?sponsor=1"
|
| 1536 |
-
}
|
| 1537 |
-
},
|
| 1538 |
-
"node_modules/domelementtype": {
|
| 1539 |
-
"version": "2.3.0",
|
| 1540 |
-
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz",
|
| 1541 |
-
"integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==",
|
| 1542 |
-
"funding": [
|
| 1543 |
-
{
|
| 1544 |
-
"type": "github",
|
| 1545 |
-
"url": "https://github.com/sponsors/fb55"
|
| 1546 |
-
}
|
| 1547 |
-
],
|
| 1548 |
-
"license": "BSD-2-Clause"
|
| 1549 |
-
},
|
| 1550 |
-
"node_modules/domhandler": {
|
| 1551 |
-
"version": "5.0.3",
|
| 1552 |
-
"resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz",
|
| 1553 |
-
"integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==",
|
| 1554 |
-
"license": "BSD-2-Clause",
|
| 1555 |
-
"dependencies": {
|
| 1556 |
-
"domelementtype": "^2.3.0"
|
| 1557 |
-
},
|
| 1558 |
-
"engines": {
|
| 1559 |
-
"node": ">= 4"
|
| 1560 |
-
},
|
| 1561 |
-
"funding": {
|
| 1562 |
-
"url": "https://github.com/fb55/domhandler?sponsor=1"
|
| 1563 |
-
}
|
| 1564 |
-
},
|
| 1565 |
-
"node_modules/domutils": {
|
| 1566 |
-
"version": "3.2.2",
|
| 1567 |
-
"resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz",
|
| 1568 |
-
"integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==",
|
| 1569 |
-
"license": "BSD-2-Clause",
|
| 1570 |
-
"dependencies": {
|
| 1571 |
-
"dom-serializer": "^2.0.0",
|
| 1572 |
-
"domelementtype": "^2.3.0",
|
| 1573 |
-
"domhandler": "^5.0.3"
|
| 1574 |
-
},
|
| 1575 |
-
"funding": {
|
| 1576 |
-
"url": "https://github.com/fb55/domutils?sponsor=1"
|
| 1577 |
-
}
|
| 1578 |
-
},
|
| 1579 |
"node_modules/dunder-proto": {
|
| 1580 |
"version": "1.0.1",
|
| 1581 |
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
|
|
@@ -1612,43 +1522,6 @@
|
|
| 1612 |
"node": ">= 0.8"
|
| 1613 |
}
|
| 1614 |
},
|
| 1615 |
-
"node_modules/encoding-sniffer": {
|
| 1616 |
-
"version": "0.2.1",
|
| 1617 |
-
"resolved": "https://registry.npmjs.org/encoding-sniffer/-/encoding-sniffer-0.2.1.tgz",
|
| 1618 |
-
"integrity": "sha512-5gvq20T6vfpekVtqrYQsSCFZ1wEg5+wW0/QaZMWkFr6BqD3NfKs0rLCx4rrVlSWJeZb5NBJgVLswK/w2MWU+Gw==",
|
| 1619 |
-
"license": "MIT",
|
| 1620 |
-
"dependencies": {
|
| 1621 |
-
"iconv-lite": "^0.6.3",
|
| 1622 |
-
"whatwg-encoding": "^3.1.1"
|
| 1623 |
-
},
|
| 1624 |
-
"funding": {
|
| 1625 |
-
"url": "https://github.com/fb55/encoding-sniffer?sponsor=1"
|
| 1626 |
-
}
|
| 1627 |
-
},
|
| 1628 |
-
"node_modules/encoding-sniffer/node_modules/iconv-lite": {
|
| 1629 |
-
"version": "0.6.3",
|
| 1630 |
-
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
| 1631 |
-
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
|
| 1632 |
-
"license": "MIT",
|
| 1633 |
-
"dependencies": {
|
| 1634 |
-
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
| 1635 |
-
},
|
| 1636 |
-
"engines": {
|
| 1637 |
-
"node": ">=0.10.0"
|
| 1638 |
-
}
|
| 1639 |
-
},
|
| 1640 |
-
"node_modules/entities": {
|
| 1641 |
-
"version": "4.5.0",
|
| 1642 |
-
"resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz",
|
| 1643 |
-
"integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
|
| 1644 |
-
"license": "BSD-2-Clause",
|
| 1645 |
-
"engines": {
|
| 1646 |
-
"node": ">=0.12"
|
| 1647 |
-
},
|
| 1648 |
-
"funding": {
|
| 1649 |
-
"url": "https://github.com/fb55/entities?sponsor=1"
|
| 1650 |
-
}
|
| 1651 |
-
},
|
| 1652 |
"node_modules/es-define-property": {
|
| 1653 |
"version": "1.0.1",
|
| 1654 |
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
|
|
@@ -1679,6 +1552,21 @@
|
|
| 1679 |
"node": ">= 0.4"
|
| 1680 |
}
|
| 1681 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1682 |
"node_modules/esbuild": {
|
| 1683 |
"version": "0.21.5",
|
| 1684 |
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz",
|
|
@@ -1743,6 +1631,15 @@
|
|
| 1743 |
"node": ">= 0.6"
|
| 1744 |
}
|
| 1745 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1746 |
"node_modules/express": {
|
| 1747 |
"version": "4.22.2",
|
| 1748 |
"resolved": "https://registry.npmjs.org/express/-/express-4.22.2.tgz",
|
|
@@ -1837,6 +1734,41 @@
|
|
| 1837 |
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
|
| 1838 |
"license": "MIT"
|
| 1839 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1840 |
"node_modules/forwarded": {
|
| 1841 |
"version": "0.2.0",
|
| 1842 |
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
|
|
@@ -1950,47 +1882,31 @@
|
|
| 1950 |
"url": "https://github.com/sponsors/ljharb"
|
| 1951 |
}
|
| 1952 |
},
|
| 1953 |
-
"node_modules/
|
| 1954 |
-
"version": "
|
| 1955 |
-
"resolved": "https://registry.npmjs.org/
|
| 1956 |
-
"integrity": "sha512-
|
| 1957 |
"license": "MIT",
|
| 1958 |
"dependencies": {
|
| 1959 |
-
"
|
| 1960 |
},
|
| 1961 |
"engines": {
|
| 1962 |
"node": ">= 0.4"
|
|
|
|
|
|
|
|
|
|
| 1963 |
}
|
| 1964 |
},
|
| 1965 |
-
"node_modules/
|
| 1966 |
-
"version": "
|
| 1967 |
-
"resolved": "https://registry.npmjs.org/
|
| 1968 |
-
"integrity": "sha512-
|
| 1969 |
-
"funding": [
|
| 1970 |
-
"https://github.com/fb55/htmlparser2?sponsor=1",
|
| 1971 |
-
{
|
| 1972 |
-
"type": "github",
|
| 1973 |
-
"url": "https://github.com/sponsors/fb55"
|
| 1974 |
-
}
|
| 1975 |
-
],
|
| 1976 |
"license": "MIT",
|
| 1977 |
"dependencies": {
|
| 1978 |
-
"
|
| 1979 |
-
"domhandler": "^5.0.3",
|
| 1980 |
-
"domutils": "^3.2.2",
|
| 1981 |
-
"entities": "^7.0.1"
|
| 1982 |
-
}
|
| 1983 |
-
},
|
| 1984 |
-
"node_modules/htmlparser2/node_modules/entities": {
|
| 1985 |
-
"version": "7.0.1",
|
| 1986 |
-
"resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz",
|
| 1987 |
-
"integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==",
|
| 1988 |
-
"license": "BSD-2-Clause",
|
| 1989 |
-
"engines": {
|
| 1990 |
-
"node": ">=0.12"
|
| 1991 |
},
|
| 1992 |
-
"
|
| 1993 |
-
"
|
| 1994 |
}
|
| 1995 |
},
|
| 1996 |
"node_modules/http-errors": {
|
|
@@ -2013,6 +1929,15 @@
|
|
| 2013 |
"url": "https://opencollective.com/express"
|
| 2014 |
}
|
| 2015 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2016 |
"node_modules/iconv-lite": {
|
| 2017 |
"version": "0.4.24",
|
| 2018 |
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
|
@@ -2206,6 +2131,46 @@
|
|
| 2206 |
"node": ">= 0.6"
|
| 2207 |
}
|
| 2208 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2209 |
"node_modules/node-releases": {
|
| 2210 |
"version": "2.0.46",
|
| 2211 |
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.46.tgz",
|
|
@@ -2216,18 +2181,6 @@
|
|
| 2216 |
"node": ">=18"
|
| 2217 |
}
|
| 2218 |
},
|
| 2219 |
-
"node_modules/nth-check": {
|
| 2220 |
-
"version": "2.1.1",
|
| 2221 |
-
"resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz",
|
| 2222 |
-
"integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==",
|
| 2223 |
-
"license": "BSD-2-Clause",
|
| 2224 |
-
"dependencies": {
|
| 2225 |
-
"boolbase": "^1.0.0"
|
| 2226 |
-
},
|
| 2227 |
-
"funding": {
|
| 2228 |
-
"url": "https://github.com/fb55/nth-check?sponsor=1"
|
| 2229 |
-
}
|
| 2230 |
-
},
|
| 2231 |
"node_modules/object-inspect": {
|
| 2232 |
"version": "1.13.4",
|
| 2233 |
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
|
|
@@ -2252,53 +2205,34 @@
|
|
| 2252 |
"node": ">= 0.8"
|
| 2253 |
}
|
| 2254 |
},
|
| 2255 |
-
"node_modules/
|
| 2256 |
-
"version": "
|
| 2257 |
-
"resolved": "https://registry.npmjs.org/
|
| 2258 |
-
"integrity": "sha512-
|
| 2259 |
-
"license": "
|
| 2260 |
-
"dependencies": {
|
| 2261 |
-
"entities": "^6.0.0"
|
| 2262 |
-
},
|
| 2263 |
-
"funding": {
|
| 2264 |
-
"url": "https://github.com/inikulin/parse5?sponsor=1"
|
| 2265 |
-
}
|
| 2266 |
-
},
|
| 2267 |
-
"node_modules/parse5-htmlparser2-tree-adapter": {
|
| 2268 |
-
"version": "7.1.0",
|
| 2269 |
-
"resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.1.0.tgz",
|
| 2270 |
-
"integrity": "sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==",
|
| 2271 |
-
"license": "MIT",
|
| 2272 |
"dependencies": {
|
| 2273 |
-
"
|
| 2274 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2275 |
},
|
| 2276 |
-
"
|
| 2277 |
-
"
|
| 2278 |
-
}
|
| 2279 |
-
},
|
| 2280 |
-
"node_modules/parse5-parser-stream": {
|
| 2281 |
-
"version": "7.1.2",
|
| 2282 |
-
"resolved": "https://registry.npmjs.org/parse5-parser-stream/-/parse5-parser-stream-7.1.2.tgz",
|
| 2283 |
-
"integrity": "sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==",
|
| 2284 |
-
"license": "MIT",
|
| 2285 |
-
"dependencies": {
|
| 2286 |
-
"parse5": "^7.0.0"
|
| 2287 |
},
|
| 2288 |
-
"
|
| 2289 |
-
"
|
| 2290 |
-
|
| 2291 |
-
},
|
| 2292 |
-
"node_modules/parse5/node_modules/entities": {
|
| 2293 |
-
"version": "6.0.1",
|
| 2294 |
-
"resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz",
|
| 2295 |
-
"integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==",
|
| 2296 |
-
"license": "BSD-2-Clause",
|
| 2297 |
-
"engines": {
|
| 2298 |
-
"node": ">=0.12"
|
| 2299 |
},
|
| 2300 |
-
"
|
| 2301 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2302 |
}
|
| 2303 |
},
|
| 2304 |
"node_modules/parseurl": {
|
|
@@ -2689,6 +2623,12 @@
|
|
| 2689 |
"node": ">=0.6"
|
| 2690 |
}
|
| 2691 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2692 |
"node_modules/type-is": {
|
| 2693 |
"version": "1.6.18",
|
| 2694 |
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
|
|
@@ -2702,14 +2642,11 @@
|
|
| 2702 |
"node": ">= 0.6"
|
| 2703 |
}
|
| 2704 |
},
|
| 2705 |
-
"node_modules/undici": {
|
| 2706 |
-
"version": "
|
| 2707 |
-
"resolved": "https://registry.npmjs.org/undici/-/undici-
|
| 2708 |
-
"integrity": "sha512-+
|
| 2709 |
-
"license": "MIT"
|
| 2710 |
-
"engines": {
|
| 2711 |
-
"node": ">=20.18.1"
|
| 2712 |
-
}
|
| 2713 |
},
|
| 2714 |
"node_modules/unpipe": {
|
| 2715 |
"version": "1.0.0",
|
|
@@ -2829,38 +2766,29 @@
|
|
| 2829 |
}
|
| 2830 |
}
|
| 2831 |
},
|
| 2832 |
-
"node_modules/
|
| 2833 |
-
"version": "
|
| 2834 |
-
"resolved": "https://registry.npmjs.org/
|
| 2835 |
-
"integrity": "sha512-
|
| 2836 |
-
"deprecated": "Use @exodus/bytes instead for a more spec-conformant and faster implementation",
|
| 2837 |
"license": "MIT",
|
| 2838 |
-
"dependencies": {
|
| 2839 |
-
"iconv-lite": "0.6.3"
|
| 2840 |
-
},
|
| 2841 |
"engines": {
|
| 2842 |
-
"node": ">=
|
| 2843 |
}
|
| 2844 |
},
|
| 2845 |
-
"node_modules/
|
| 2846 |
-
"version": "0.
|
| 2847 |
-
"resolved": "https://registry.npmjs.org/
|
| 2848 |
-
"integrity": "sha512-
|
| 2849 |
-
"license": "
|
| 2850 |
-
"dependencies": {
|
| 2851 |
-
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
| 2852 |
-
},
|
| 2853 |
-
"engines": {
|
| 2854 |
-
"node": ">=0.10.0"
|
| 2855 |
-
}
|
| 2856 |
},
|
| 2857 |
-
"node_modules/whatwg-
|
| 2858 |
-
"version": "
|
| 2859 |
-
"resolved": "https://registry.npmjs.org/whatwg-
|
| 2860 |
-
"integrity": "sha512-
|
| 2861 |
"license": "MIT",
|
| 2862 |
-
"
|
| 2863 |
-
"
|
|
|
|
| 2864 |
}
|
| 2865 |
},
|
| 2866 |
"node_modules/yallist": {
|
|
|
|
| 8 |
"name": "rememberit",
|
| 9 |
"version": "1.0.0",
|
| 10 |
"dependencies": {
|
|
|
|
|
|
|
| 11 |
"express": "^4.18.2",
|
| 12 |
"lucide-react": "^0.454.0",
|
| 13 |
+
"openai": "^4.73.0",
|
| 14 |
"react": "^18.3.1",
|
| 15 |
"react-dom": "^18.3.1"
|
| 16 |
},
|
|
|
|
| 692 |
"node": ">=12"
|
| 693 |
}
|
| 694 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 695 |
"node_modules/@jridgewell/gen-mapping": {
|
| 696 |
"version": "0.3.13",
|
| 697 |
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",
|
|
|
|
| 1151 |
"dev": true,
|
| 1152 |
"license": "MIT"
|
| 1153 |
},
|
| 1154 |
+
"node_modules/@types/node": {
|
| 1155 |
+
"version": "18.19.130",
|
| 1156 |
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.130.tgz",
|
| 1157 |
+
"integrity": "sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg==",
|
| 1158 |
+
"license": "MIT",
|
| 1159 |
+
"dependencies": {
|
| 1160 |
+
"undici-types": "~5.26.4"
|
| 1161 |
+
}
|
| 1162 |
+
},
|
| 1163 |
+
"node_modules/@types/node-fetch": {
|
| 1164 |
+
"version": "2.6.13",
|
| 1165 |
+
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.13.tgz",
|
| 1166 |
+
"integrity": "sha512-QGpRVpzSaUs30JBSGPjOg4Uveu384erbHBoT1zeONvyCfwQxIkUshLAOqN/k9EjGviPRmWTTe6aH2qySWKTVSw==",
|
| 1167 |
+
"license": "MIT",
|
| 1168 |
+
"dependencies": {
|
| 1169 |
+
"@types/node": "*",
|
| 1170 |
+
"form-data": "^4.0.4"
|
| 1171 |
+
}
|
| 1172 |
+
},
|
| 1173 |
"node_modules/@vitejs/plugin-react": {
|
| 1174 |
"version": "4.7.0",
|
| 1175 |
"resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.7.0.tgz",
|
|
|
|
| 1191 |
"vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0"
|
| 1192 |
}
|
| 1193 |
},
|
| 1194 |
+
"node_modules/abort-controller": {
|
| 1195 |
+
"version": "3.0.0",
|
| 1196 |
+
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
|
| 1197 |
+
"integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
|
| 1198 |
+
"license": "MIT",
|
| 1199 |
+
"dependencies": {
|
| 1200 |
+
"event-target-shim": "^5.0.0"
|
| 1201 |
+
},
|
| 1202 |
+
"engines": {
|
| 1203 |
+
"node": ">=6.5"
|
| 1204 |
+
}
|
| 1205 |
+
},
|
| 1206 |
"node_modules/accepts": {
|
| 1207 |
"version": "1.3.8",
|
| 1208 |
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
|
|
|
|
| 1216 |
"node": ">= 0.6"
|
| 1217 |
}
|
| 1218 |
},
|
| 1219 |
+
"node_modules/agentkeepalive": {
|
| 1220 |
+
"version": "4.6.0",
|
| 1221 |
+
"resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.6.0.tgz",
|
| 1222 |
+
"integrity": "sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==",
|
| 1223 |
+
"license": "MIT",
|
| 1224 |
+
"dependencies": {
|
| 1225 |
+
"humanize-ms": "^1.2.1"
|
| 1226 |
+
},
|
| 1227 |
+
"engines": {
|
| 1228 |
+
"node": ">= 8.0.0"
|
| 1229 |
+
}
|
| 1230 |
+
},
|
| 1231 |
"node_modules/array-flatten": {
|
| 1232 |
"version": "1.1.1",
|
| 1233 |
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
|
| 1234 |
"integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==",
|
| 1235 |
"license": "MIT"
|
| 1236 |
},
|
| 1237 |
+
"node_modules/asynckit": {
|
| 1238 |
+
"version": "0.4.0",
|
| 1239 |
+
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
| 1240 |
+
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
|
| 1241 |
+
"license": "MIT"
|
| 1242 |
+
},
|
| 1243 |
"node_modules/baseline-browser-mapping": {
|
| 1244 |
"version": "2.10.33",
|
| 1245 |
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.33.tgz",
|
|
|
|
| 1292 |
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
|
| 1293 |
"license": "MIT"
|
| 1294 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1295 |
"node_modules/browserslist": {
|
| 1296 |
"version": "4.28.2",
|
| 1297 |
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz",
|
|
|
|
| 1385 |
],
|
| 1386 |
"license": "CC-BY-4.0"
|
| 1387 |
},
|
| 1388 |
+
"node_modules/combined-stream": {
|
| 1389 |
+
"version": "1.0.8",
|
| 1390 |
+
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
| 1391 |
+
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
|
| 1392 |
"license": "MIT",
|
| 1393 |
"dependencies": {
|
| 1394 |
+
"delayed-stream": "~1.0.0"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1395 |
},
|
| 1396 |
"engines": {
|
| 1397 |
+
"node": ">= 0.8"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1398 |
}
|
| 1399 |
},
|
| 1400 |
"node_modules/content-disposition": {
|
|
|
|
| 1440 |
"integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==",
|
| 1441 |
"license": "MIT"
|
| 1442 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1443 |
"node_modules/debug": {
|
| 1444 |
"version": "4.4.3",
|
| 1445 |
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
|
|
|
|
| 1458 |
}
|
| 1459 |
}
|
| 1460 |
},
|
| 1461 |
+
"node_modules/delayed-stream": {
|
| 1462 |
+
"version": "1.0.0",
|
| 1463 |
+
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
| 1464 |
+
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
|
| 1465 |
+
"license": "MIT",
|
| 1466 |
+
"engines": {
|
| 1467 |
+
"node": ">=0.4.0"
|
| 1468 |
+
}
|
| 1469 |
+
},
|
| 1470 |
"node_modules/depd": {
|
| 1471 |
"version": "2.0.0",
|
| 1472 |
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
|
|
|
|
| 1486 |
"npm": "1.2.8000 || >= 1.4.16"
|
| 1487 |
}
|
| 1488 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1489 |
"node_modules/dunder-proto": {
|
| 1490 |
"version": "1.0.1",
|
| 1491 |
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
|
|
|
|
| 1522 |
"node": ">= 0.8"
|
| 1523 |
}
|
| 1524 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1525 |
"node_modules/es-define-property": {
|
| 1526 |
"version": "1.0.1",
|
| 1527 |
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
|
|
|
|
| 1552 |
"node": ">= 0.4"
|
| 1553 |
}
|
| 1554 |
},
|
| 1555 |
+
"node_modules/es-set-tostringtag": {
|
| 1556 |
+
"version": "2.1.0",
|
| 1557 |
+
"resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",
|
| 1558 |
+
"integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",
|
| 1559 |
+
"license": "MIT",
|
| 1560 |
+
"dependencies": {
|
| 1561 |
+
"es-errors": "^1.3.0",
|
| 1562 |
+
"get-intrinsic": "^1.2.6",
|
| 1563 |
+
"has-tostringtag": "^1.0.2",
|
| 1564 |
+
"hasown": "^2.0.2"
|
| 1565 |
+
},
|
| 1566 |
+
"engines": {
|
| 1567 |
+
"node": ">= 0.4"
|
| 1568 |
+
}
|
| 1569 |
+
},
|
| 1570 |
"node_modules/esbuild": {
|
| 1571 |
"version": "0.21.5",
|
| 1572 |
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz",
|
|
|
|
| 1631 |
"node": ">= 0.6"
|
| 1632 |
}
|
| 1633 |
},
|
| 1634 |
+
"node_modules/event-target-shim": {
|
| 1635 |
+
"version": "5.0.1",
|
| 1636 |
+
"resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
|
| 1637 |
+
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
|
| 1638 |
+
"license": "MIT",
|
| 1639 |
+
"engines": {
|
| 1640 |
+
"node": ">=6"
|
| 1641 |
+
}
|
| 1642 |
+
},
|
| 1643 |
"node_modules/express": {
|
| 1644 |
"version": "4.22.2",
|
| 1645 |
"resolved": "https://registry.npmjs.org/express/-/express-4.22.2.tgz",
|
|
|
|
| 1734 |
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
|
| 1735 |
"license": "MIT"
|
| 1736 |
},
|
| 1737 |
+
"node_modules/form-data": {
|
| 1738 |
+
"version": "4.0.5",
|
| 1739 |
+
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz",
|
| 1740 |
+
"integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==",
|
| 1741 |
+
"license": "MIT",
|
| 1742 |
+
"dependencies": {
|
| 1743 |
+
"asynckit": "^0.4.0",
|
| 1744 |
+
"combined-stream": "^1.0.8",
|
| 1745 |
+
"es-set-tostringtag": "^2.1.0",
|
| 1746 |
+
"hasown": "^2.0.2",
|
| 1747 |
+
"mime-types": "^2.1.12"
|
| 1748 |
+
},
|
| 1749 |
+
"engines": {
|
| 1750 |
+
"node": ">= 6"
|
| 1751 |
+
}
|
| 1752 |
+
},
|
| 1753 |
+
"node_modules/form-data-encoder": {
|
| 1754 |
+
"version": "1.7.2",
|
| 1755 |
+
"resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.2.tgz",
|
| 1756 |
+
"integrity": "sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==",
|
| 1757 |
+
"license": "MIT"
|
| 1758 |
+
},
|
| 1759 |
+
"node_modules/formdata-node": {
|
| 1760 |
+
"version": "4.4.1",
|
| 1761 |
+
"resolved": "https://registry.npmjs.org/formdata-node/-/formdata-node-4.4.1.tgz",
|
| 1762 |
+
"integrity": "sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==",
|
| 1763 |
+
"license": "MIT",
|
| 1764 |
+
"dependencies": {
|
| 1765 |
+
"node-domexception": "1.0.0",
|
| 1766 |
+
"web-streams-polyfill": "4.0.0-beta.3"
|
| 1767 |
+
},
|
| 1768 |
+
"engines": {
|
| 1769 |
+
"node": ">= 12.20"
|
| 1770 |
+
}
|
| 1771 |
+
},
|
| 1772 |
"node_modules/forwarded": {
|
| 1773 |
"version": "0.2.0",
|
| 1774 |
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
|
|
|
|
| 1882 |
"url": "https://github.com/sponsors/ljharb"
|
| 1883 |
}
|
| 1884 |
},
|
| 1885 |
+
"node_modules/has-tostringtag": {
|
| 1886 |
+
"version": "1.0.2",
|
| 1887 |
+
"resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
|
| 1888 |
+
"integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
|
| 1889 |
"license": "MIT",
|
| 1890 |
"dependencies": {
|
| 1891 |
+
"has-symbols": "^1.0.3"
|
| 1892 |
},
|
| 1893 |
"engines": {
|
| 1894 |
"node": ">= 0.4"
|
| 1895 |
+
},
|
| 1896 |
+
"funding": {
|
| 1897 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 1898 |
}
|
| 1899 |
},
|
| 1900 |
+
"node_modules/hasown": {
|
| 1901 |
+
"version": "2.0.4",
|
| 1902 |
+
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz",
|
| 1903 |
+
"integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1904 |
"license": "MIT",
|
| 1905 |
"dependencies": {
|
| 1906 |
+
"function-bind": "^1.1.2"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1907 |
},
|
| 1908 |
+
"engines": {
|
| 1909 |
+
"node": ">= 0.4"
|
| 1910 |
}
|
| 1911 |
},
|
| 1912 |
"node_modules/http-errors": {
|
|
|
|
| 1929 |
"url": "https://opencollective.com/express"
|
| 1930 |
}
|
| 1931 |
},
|
| 1932 |
+
"node_modules/humanize-ms": {
|
| 1933 |
+
"version": "1.2.1",
|
| 1934 |
+
"resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz",
|
| 1935 |
+
"integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==",
|
| 1936 |
+
"license": "MIT",
|
| 1937 |
+
"dependencies": {
|
| 1938 |
+
"ms": "^2.0.0"
|
| 1939 |
+
}
|
| 1940 |
+
},
|
| 1941 |
"node_modules/iconv-lite": {
|
| 1942 |
"version": "0.4.24",
|
| 1943 |
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
|
|
|
| 2131 |
"node": ">= 0.6"
|
| 2132 |
}
|
| 2133 |
},
|
| 2134 |
+
"node_modules/node-domexception": {
|
| 2135 |
+
"version": "1.0.0",
|
| 2136 |
+
"resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
|
| 2137 |
+
"integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==",
|
| 2138 |
+
"deprecated": "Use your platform's native DOMException instead",
|
| 2139 |
+
"funding": [
|
| 2140 |
+
{
|
| 2141 |
+
"type": "github",
|
| 2142 |
+
"url": "https://github.com/sponsors/jimmywarting"
|
| 2143 |
+
},
|
| 2144 |
+
{
|
| 2145 |
+
"type": "github",
|
| 2146 |
+
"url": "https://paypal.me/jimmywarting"
|
| 2147 |
+
}
|
| 2148 |
+
],
|
| 2149 |
+
"license": "MIT",
|
| 2150 |
+
"engines": {
|
| 2151 |
+
"node": ">=10.5.0"
|
| 2152 |
+
}
|
| 2153 |
+
},
|
| 2154 |
+
"node_modules/node-fetch": {
|
| 2155 |
+
"version": "2.7.0",
|
| 2156 |
+
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
|
| 2157 |
+
"integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
|
| 2158 |
+
"license": "MIT",
|
| 2159 |
+
"dependencies": {
|
| 2160 |
+
"whatwg-url": "^5.0.0"
|
| 2161 |
+
},
|
| 2162 |
+
"engines": {
|
| 2163 |
+
"node": "4.x || >=6.0.0"
|
| 2164 |
+
},
|
| 2165 |
+
"peerDependencies": {
|
| 2166 |
+
"encoding": "^0.1.0"
|
| 2167 |
+
},
|
| 2168 |
+
"peerDependenciesMeta": {
|
| 2169 |
+
"encoding": {
|
| 2170 |
+
"optional": true
|
| 2171 |
+
}
|
| 2172 |
+
}
|
| 2173 |
+
},
|
| 2174 |
"node_modules/node-releases": {
|
| 2175 |
"version": "2.0.46",
|
| 2176 |
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.46.tgz",
|
|
|
|
| 2181 |
"node": ">=18"
|
| 2182 |
}
|
| 2183 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2184 |
"node_modules/object-inspect": {
|
| 2185 |
"version": "1.13.4",
|
| 2186 |
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
|
|
|
|
| 2205 |
"node": ">= 0.8"
|
| 2206 |
}
|
| 2207 |
},
|
| 2208 |
+
"node_modules/openai": {
|
| 2209 |
+
"version": "4.104.0",
|
| 2210 |
+
"resolved": "https://registry.npmjs.org/openai/-/openai-4.104.0.tgz",
|
| 2211 |
+
"integrity": "sha512-p99EFNsA/yX6UhVO93f5kJsDRLAg+CTA2RBqdHK4RtK8u5IJw32Hyb2dTGKbnnFmnuoBv5r7Z2CURI9sGZpSuA==",
|
| 2212 |
+
"license": "Apache-2.0",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2213 |
"dependencies": {
|
| 2214 |
+
"@types/node": "^18.11.18",
|
| 2215 |
+
"@types/node-fetch": "^2.6.4",
|
| 2216 |
+
"abort-controller": "^3.0.0",
|
| 2217 |
+
"agentkeepalive": "^4.2.1",
|
| 2218 |
+
"form-data-encoder": "1.7.2",
|
| 2219 |
+
"formdata-node": "^4.3.2",
|
| 2220 |
+
"node-fetch": "^2.6.7"
|
| 2221 |
},
|
| 2222 |
+
"bin": {
|
| 2223 |
+
"openai": "bin/cli"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2224 |
},
|
| 2225 |
+
"peerDependencies": {
|
| 2226 |
+
"ws": "^8.18.0",
|
| 2227 |
+
"zod": "^3.23.8"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2228 |
},
|
| 2229 |
+
"peerDependenciesMeta": {
|
| 2230 |
+
"ws": {
|
| 2231 |
+
"optional": true
|
| 2232 |
+
},
|
| 2233 |
+
"zod": {
|
| 2234 |
+
"optional": true
|
| 2235 |
+
}
|
| 2236 |
}
|
| 2237 |
},
|
| 2238 |
"node_modules/parseurl": {
|
|
|
|
| 2623 |
"node": ">=0.6"
|
| 2624 |
}
|
| 2625 |
},
|
| 2626 |
+
"node_modules/tr46": {
|
| 2627 |
+
"version": "0.0.3",
|
| 2628 |
+
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
| 2629 |
+
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
|
| 2630 |
+
"license": "MIT"
|
| 2631 |
+
},
|
| 2632 |
"node_modules/type-is": {
|
| 2633 |
"version": "1.6.18",
|
| 2634 |
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
|
|
|
|
| 2642 |
"node": ">= 0.6"
|
| 2643 |
}
|
| 2644 |
},
|
| 2645 |
+
"node_modules/undici-types": {
|
| 2646 |
+
"version": "5.26.5",
|
| 2647 |
+
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
|
| 2648 |
+
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
|
| 2649 |
+
"license": "MIT"
|
|
|
|
|
|
|
|
|
|
| 2650 |
},
|
| 2651 |
"node_modules/unpipe": {
|
| 2652 |
"version": "1.0.0",
|
|
|
|
| 2766 |
}
|
| 2767 |
}
|
| 2768 |
},
|
| 2769 |
+
"node_modules/web-streams-polyfill": {
|
| 2770 |
+
"version": "4.0.0-beta.3",
|
| 2771 |
+
"resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz",
|
| 2772 |
+
"integrity": "sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==",
|
|
|
|
| 2773 |
"license": "MIT",
|
|
|
|
|
|
|
|
|
|
| 2774 |
"engines": {
|
| 2775 |
+
"node": ">= 14"
|
| 2776 |
}
|
| 2777 |
},
|
| 2778 |
+
"node_modules/webidl-conversions": {
|
| 2779 |
+
"version": "3.0.1",
|
| 2780 |
+
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
|
| 2781 |
+
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
|
| 2782 |
+
"license": "BSD-2-Clause"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2783 |
},
|
| 2784 |
+
"node_modules/whatwg-url": {
|
| 2785 |
+
"version": "5.0.0",
|
| 2786 |
+
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
| 2787 |
+
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
|
| 2788 |
"license": "MIT",
|
| 2789 |
+
"dependencies": {
|
| 2790 |
+
"tr46": "~0.0.3",
|
| 2791 |
+
"webidl-conversions": "^3.0.0"
|
| 2792 |
}
|
| 2793 |
},
|
| 2794 |
"node_modules/yallist": {
|
package.json
CHANGED
|
@@ -10,10 +10,9 @@
|
|
| 10 |
"start": "node server.js"
|
| 11 |
},
|
| 12 |
"dependencies": {
|
| 13 |
-
"@huggingface/inference": "^4.13.18",
|
| 14 |
-
"cheerio": "^1.2.0",
|
| 15 |
"express": "^4.18.2",
|
| 16 |
"lucide-react": "^0.454.0",
|
|
|
|
| 17 |
"react": "^18.3.1",
|
| 18 |
"react-dom": "^18.3.1"
|
| 19 |
},
|
|
|
|
| 10 |
"start": "node server.js"
|
| 11 |
},
|
| 12 |
"dependencies": {
|
|
|
|
|
|
|
| 13 |
"express": "^4.18.2",
|
| 14 |
"lucide-react": "^0.454.0",
|
| 15 |
+
"openai": "^4.73.0",
|
| 16 |
"react": "^18.3.1",
|
| 17 |
"react-dom": "^18.3.1"
|
| 18 |
},
|
server.js
CHANGED
|
@@ -1,17 +1,19 @@
|
|
| 1 |
import express from "express";
|
| 2 |
import { join, dirname } from "path";
|
| 3 |
import { fileURLToPath } from "url";
|
| 4 |
-
import
|
| 5 |
|
| 6 |
const __dirname = dirname(fileURLToPath(import.meta.url));
|
| 7 |
const app = express();
|
| 8 |
const PORT = process.env.PORT || 7860;
|
| 9 |
|
|
|
|
|
|
|
| 10 |
app.use(express.json({ limit: "1mb" }));
|
| 11 |
|
| 12 |
app.get("/api/check", async (_, res) => {
|
| 13 |
const env = {};
|
| 14 |
-
const interesting = ["
|
| 15 |
for (const key of interesting) {
|
| 16 |
if (process.env[key]) env[key] = process.env[key].length > 10 ? process.env[key].slice(0, 8) + "..." : "(set)";
|
| 17 |
else env[key] = "(not set)";
|
|
@@ -21,68 +23,40 @@ app.get("/api/check", async (_, res) => {
|
|
| 21 |
|
| 22 |
app.post("/api/hf", async (req, res) => {
|
| 23 |
try {
|
| 24 |
-
const
|
| 25 |
-
if (!
|
| 26 |
-
return res.status(500).json({ error: "
|
| 27 |
}
|
| 28 |
|
| 29 |
-
const
|
| 30 |
-
const model = req.body.model || "
|
| 31 |
const messages = req.body.messages || [];
|
| 32 |
-
|
| 33 |
const maxTokens = req.body.max_tokens || 1000;
|
| 34 |
|
| 35 |
-
const out = await
|
| 36 |
-
model,
|
| 37 |
-
messages,
|
| 38 |
-
max_tokens: maxTokens,
|
| 39 |
-
});
|
| 40 |
-
|
| 41 |
res.json(out);
|
| 42 |
} catch (err) {
|
| 43 |
-
console.error("
|
| 44 |
const msg = err.message || String(err);
|
| 45 |
-
const
|
| 46 |
-
|
| 47 |
-
res.status(500).json({ error: msg + (cause ? " — " + cause : "") + (body ? " | body: " + body : "") });
|
| 48 |
}
|
| 49 |
});
|
| 50 |
|
| 51 |
app.get("/api/test-lib", async (_, res) => {
|
| 52 |
const results = {};
|
| 53 |
-
const
|
| 54 |
-
|
| 55 |
-
// Try direct model inference on huggingface.co
|
| 56 |
-
const models = ["google/gemma-2-2b-it", "gpt2", "Qwen/Qwen2.5-7B-Instruct-1M"];
|
| 57 |
-
for (const model of models) {
|
| 58 |
-
try {
|
| 59 |
-
const r = await fetch(`https://huggingface.co/${model}`, {
|
| 60 |
-
method: "POST",
|
| 61 |
-
headers: {
|
| 62 |
-
"Content-Type": "application/json",
|
| 63 |
-
Authorization: `Bearer ${token}`,
|
| 64 |
-
},
|
| 65 |
-
body: JSON.stringify({
|
| 66 |
-
inputs: "What is a jar opener? Answer in one sentence.",
|
| 67 |
-
parameters: { max_new_tokens: 50 },
|
| 68 |
-
}),
|
| 69 |
-
});
|
| 70 |
-
const text = await r.text();
|
| 71 |
-
results[`model_${model}`] = { status: r.status, body: text.slice(0, 300) };
|
| 72 |
-
} catch (e) {
|
| 73 |
-
results[`model_${model}`] = { error: e.message };
|
| 74 |
-
}
|
| 75 |
-
}
|
| 76 |
|
| 77 |
-
// Also try the /api/models/{model} endpoint
|
| 78 |
try {
|
| 79 |
-
const
|
| 80 |
-
|
|
|
|
|
|
|
|
|
|
| 81 |
});
|
| 82 |
-
|
| 83 |
-
results["model_info"] = { pipeline_tag: d.pipeline_tag, inference: d.inference, cardData: d.cardData ? "present" : "none" };
|
| 84 |
} catch (e) {
|
| 85 |
-
results["
|
| 86 |
}
|
| 87 |
|
| 88 |
res.json(results);
|
|
|
|
| 1 |
import express from "express";
|
| 2 |
import { join, dirname } from "path";
|
| 3 |
import { fileURLToPath } from "url";
|
| 4 |
+
import OpenAI from "openai";
|
| 5 |
|
| 6 |
const __dirname = dirname(fileURLToPath(import.meta.url));
|
| 7 |
const app = express();
|
| 8 |
const PORT = process.env.PORT || 7860;
|
| 9 |
|
| 10 |
+
const BASE = "https://sharktide-lightning.hf.space/v1";
|
| 11 |
+
|
| 12 |
app.use(express.json({ limit: "1mb" }));
|
| 13 |
|
| 14 |
app.get("/api/check", async (_, res) => {
|
| 15 |
const env = {};
|
| 16 |
+
const interesting = ["IPAI_SK", "SPACE_ID", "SPACE_TITLE"];
|
| 17 |
for (const key of interesting) {
|
| 18 |
if (process.env[key]) env[key] = process.env[key].length > 10 ? process.env[key].slice(0, 8) + "..." : "(set)";
|
| 19 |
else env[key] = "(not set)";
|
|
|
|
| 23 |
|
| 24 |
app.post("/api/hf", async (req, res) => {
|
| 25 |
try {
|
| 26 |
+
const key = process.env.IPAI_SK;
|
| 27 |
+
if (!key) {
|
| 28 |
+
return res.status(500).json({ error: "IPAI_SK not configured" });
|
| 29 |
}
|
| 30 |
|
| 31 |
+
const openai = new OpenAI({ apiKey: key, baseURL: BASE });
|
| 32 |
+
const model = req.body.model || "llama3-70b-8192";
|
| 33 |
const messages = req.body.messages || [];
|
|
|
|
| 34 |
const maxTokens = req.body.max_tokens || 1000;
|
| 35 |
|
| 36 |
+
const out = await openai.chat.completions.create({ model, messages, max_tokens: maxTokens });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
res.json(out);
|
| 38 |
} catch (err) {
|
| 39 |
+
console.error("API error:", err);
|
| 40 |
const msg = err.message || String(err);
|
| 41 |
+
const status = err.status || 500;
|
| 42 |
+
res.status(status).json({ error: msg });
|
|
|
|
| 43 |
}
|
| 44 |
});
|
| 45 |
|
| 46 |
app.get("/api/test-lib", async (_, res) => {
|
| 47 |
const results = {};
|
| 48 |
+
const key = process.env.IPAI_SK;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
|
|
|
| 50 |
try {
|
| 51 |
+
const openai = new OpenAI({ apiKey: key, baseURL: BASE });
|
| 52 |
+
const out = await openai.chat.completions.create({
|
| 53 |
+
model: "llama3-8b-8192",
|
| 54 |
+
messages: [{ role: "user", content: "Say hello in one word." }],
|
| 55 |
+
max_tokens: 10,
|
| 56 |
});
|
| 57 |
+
results["chat"] = { status: 200, content: out.choices?.[0]?.message?.content };
|
|
|
|
| 58 |
} catch (e) {
|
| 59 |
+
results["chat"] = { error: e.message };
|
| 60 |
}
|
| 61 |
|
| 62 |
res.json(results);
|
src/rememberit.jsx
CHANGED
|
@@ -113,7 +113,7 @@ export default function RememberIt() {
|
|
| 113 |
method: "POST",
|
| 114 |
headers: { "Content-Type": "application/json" },
|
| 115 |
body: JSON.stringify({
|
| 116 |
-
model: "
|
| 117 |
max_tokens: 1000,
|
| 118 |
messages: [
|
| 119 |
{ role: "system", content: SYSTEM_PROMPT },
|
|
|
|
| 113 |
method: "POST",
|
| 114 |
headers: { "Content-Type": "application/json" },
|
| 115 |
body: JSON.stringify({
|
| 116 |
+
model: "llama3-70b-8192",
|
| 117 |
max_tokens: 1000,
|
| 118 |
messages: [
|
| 119 |
{ role: "system", content: SYSTEM_PROMPT },
|