fourmovie commited on
Commit
bce29b9
·
1 Parent(s): 60304ee

update space

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. Dockerfile +2 -2
  2. node_modules/.bin/mime +1 -0
  3. node_modules/.bin/nodemon +1 -0
  4. node_modules/.bin/nodetouch +1 -0
  5. node_modules/.bin/openai +1 -0
  6. node_modules/.bin/semver +1 -0
  7. node_modules/.package-lock.json +1505 -0
  8. node_modules/@huggingface/inference/LICENSE +21 -0
  9. node_modules/@huggingface/inference/README.md +759 -0
  10. node_modules/@huggingface/inference/dist/commonjs/InferenceClient.d.ts +32 -0
  11. node_modules/@huggingface/inference/dist/commonjs/InferenceClient.d.ts.map +1 -0
  12. node_modules/@huggingface/inference/dist/commonjs/InferenceClient.js +83 -0
  13. node_modules/@huggingface/inference/dist/commonjs/config.d.ts +4 -0
  14. node_modules/@huggingface/inference/dist/commonjs/config.d.ts.map +1 -0
  15. node_modules/@huggingface/inference/dist/commonjs/config.js +6 -0
  16. node_modules/@huggingface/inference/dist/commonjs/errors.d.ts +46 -0
  17. node_modules/@huggingface/inference/dist/commonjs/errors.d.ts.map +1 -0
  18. node_modules/@huggingface/inference/dist/commonjs/errors.js +70 -0
  19. node_modules/@huggingface/inference/dist/commonjs/index.d.ts +7 -0
  20. node_modules/@huggingface/inference/dist/commonjs/index.d.ts.map +1 -0
  21. node_modules/@huggingface/inference/dist/commonjs/index.js +48 -0
  22. node_modules/@huggingface/inference/dist/commonjs/lib/getDefaultTask.d.ts +11 -0
  23. node_modules/@huggingface/inference/dist/commonjs/lib/getDefaultTask.d.ts.map +1 -0
  24. node_modules/@huggingface/inference/dist/commonjs/lib/getDefaultTask.js +48 -0
  25. node_modules/@huggingface/inference/dist/commonjs/lib/getInferenceProviderMapping.d.ts +25 -0
  26. node_modules/@huggingface/inference/dist/commonjs/lib/getInferenceProviderMapping.d.ts.map +1 -0
  27. node_modules/@huggingface/inference/dist/commonjs/lib/getInferenceProviderMapping.js +92 -0
  28. node_modules/@huggingface/inference/dist/commonjs/lib/getProviderHelper.d.ts +37 -0
  29. node_modules/@huggingface/inference/dist/commonjs/lib/getProviderHelper.d.ts.map +1 -0
  30. node_modules/@huggingface/inference/dist/commonjs/lib/getProviderHelper.js +170 -0
  31. node_modules/@huggingface/inference/dist/commonjs/lib/isUrl.d.ts +2 -0
  32. node_modules/@huggingface/inference/dist/commonjs/lib/isUrl.d.ts.map +1 -0
  33. node_modules/@huggingface/inference/dist/commonjs/lib/isUrl.js +6 -0
  34. node_modules/@huggingface/inference/dist/commonjs/lib/makeRequestOptions.d.ts +31 -0
  35. node_modules/@huggingface/inference/dist/commonjs/lib/makeRequestOptions.d.ts.map +1 -0
  36. node_modules/@huggingface/inference/dist/commonjs/lib/makeRequestOptions.js +162 -0
  37. node_modules/@huggingface/inference/dist/commonjs/package.d.ts +3 -0
  38. node_modules/@huggingface/inference/dist/commonjs/package.d.ts.map +1 -0
  39. node_modules/@huggingface/inference/dist/commonjs/package.js +6 -0
  40. node_modules/@huggingface/inference/dist/commonjs/package.json +3 -0
  41. node_modules/@huggingface/inference/dist/commonjs/providers/black-forest-labs.d.ts +15 -0
  42. node_modules/@huggingface/inference/dist/commonjs/providers/black-forest-labs.d.ts.map +1 -0
  43. node_modules/@huggingface/inference/dist/commonjs/providers/black-forest-labs.js +82 -0
  44. node_modules/@huggingface/inference/dist/commonjs/providers/cerebras.d.ts +21 -0
  45. node_modules/@huggingface/inference/dist/commonjs/providers/cerebras.d.ts.map +1 -0
  46. node_modules/@huggingface/inference/dist/commonjs/providers/cerebras.js +26 -0
  47. node_modules/@huggingface/inference/dist/commonjs/providers/cohere.d.ts +22 -0
  48. node_modules/@huggingface/inference/dist/commonjs/providers/cohere.d.ts.map +1 -0
  49. node_modules/@huggingface/inference/dist/commonjs/providers/cohere.js +29 -0
  50. node_modules/@huggingface/inference/dist/commonjs/providers/consts.d.ts +12 -0
Dockerfile CHANGED
@@ -1,7 +1,7 @@
1
  # Stage 1: Build Node.js dependencies
2
  FROM node:20-alpine AS node-builder
3
  WORKDIR /app
4
- COPY package.json ./
5
  RUN npm install --omit=dev
6
 
7
  # Stage 2: Final image with Python and Node.js runtime
@@ -19,7 +19,7 @@ RUN apt-get update && \
19
  rm -rf /var/lib/apt/lists/* && apt-get clean
20
 
21
  # Salin file-file Node.js dan JavaScript Anda
22
- COPY package.json ./
23
  COPY src ./src
24
 
25
  # Instal Node.js dependencies di stage akhir juga, sebagai cadangan kuat
 
1
  # Stage 1: Build Node.js dependencies
2
  FROM node:20-alpine AS node-builder
3
  WORKDIR /app
4
+ COPY package.json package-lock.json ./
5
  RUN npm install --omit=dev
6
 
7
  # Stage 2: Final image with Python and Node.js runtime
 
19
  rm -rf /var/lib/apt/lists/* && apt-get clean
20
 
21
  # Salin file-file Node.js dan JavaScript Anda
22
+ COPY package.json package-lock.json ./
23
  COPY src ./src
24
 
25
  # Instal Node.js dependencies di stage akhir juga, sebagai cadangan kuat
node_modules/.bin/mime ADDED
@@ -0,0 +1 @@
 
 
1
+ ../mime/cli.js
node_modules/.bin/nodemon ADDED
@@ -0,0 +1 @@
 
 
1
+ ../nodemon/bin/nodemon.js
node_modules/.bin/nodetouch ADDED
@@ -0,0 +1 @@
 
 
1
+ ../touch/bin/nodetouch.js
node_modules/.bin/openai ADDED
@@ -0,0 +1 @@
 
 
1
+ ../openai/bin/cli
node_modules/.bin/semver ADDED
@@ -0,0 +1 @@
 
 
1
+ ../semver/bin/semver.js
node_modules/.package-lock.json ADDED
@@ -0,0 +1,1505 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "openai-express-api",
3
+ "version": "1.0.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "node_modules/@huggingface/inference": {
8
+ "version": "4.0.4",
9
+ "resolved": "https://registry.npmjs.org/@huggingface/inference/-/inference-4.0.4.tgz",
10
+ "integrity": "sha512-Pz0l435mmlQNNOvIBqoDdG+ckdg9WdERFa8AiBnFX7ejY9DWxU31wr0sY8v9l+bsrmk6rZ3BqIXOlf5wjJf8Uw==",
11
+ "license": "MIT",
12
+ "dependencies": {
13
+ "@huggingface/jinja": "^0.5.0",
14
+ "@huggingface/tasks": "^0.19.13"
15
+ },
16
+ "engines": {
17
+ "node": ">=18"
18
+ }
19
+ },
20
+ "node_modules/@huggingface/jinja": {
21
+ "version": "0.5.0",
22
+ "resolved": "https://registry.npmjs.org/@huggingface/jinja/-/jinja-0.5.0.tgz",
23
+ "integrity": "sha512-Ptc03/jGRiYRoi0bUYKZ14MkDslsBRT24oxmsvUlfYrvQMldrxCevhPnT+hfX8awKTT8/f/0ZBBWldoeAcMHdQ==",
24
+ "license": "MIT",
25
+ "engines": {
26
+ "node": ">=18"
27
+ }
28
+ },
29
+ "node_modules/@huggingface/tasks": {
30
+ "version": "0.19.15",
31
+ "resolved": "https://registry.npmjs.org/@huggingface/tasks/-/tasks-0.19.15.tgz",
32
+ "integrity": "sha512-L4wB/iolKtsErke5yniXXNsGrSuaFmyREpcD4hL/wJox2UKtSEV5gE5gNrlvNaRLBOY41yN7/QmBF4y9byTM6Q==",
33
+ "license": "MIT"
34
+ },
35
+ "node_modules/@types/node": {
36
+ "version": "18.19.111",
37
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.111.tgz",
38
+ "integrity": "sha512-90sGdgA+QLJr1F9X79tQuEut0gEYIfkX9pydI4XGRgvFo9g2JWswefI+WUSUHPYVBHYSEfTEqBxA5hQvAZB3Mw==",
39
+ "license": "MIT",
40
+ "dependencies": {
41
+ "undici-types": "~5.26.4"
42
+ }
43
+ },
44
+ "node_modules/@types/node-fetch": {
45
+ "version": "2.6.12",
46
+ "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.12.tgz",
47
+ "integrity": "sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==",
48
+ "license": "MIT",
49
+ "dependencies": {
50
+ "@types/node": "*",
51
+ "form-data": "^4.0.0"
52
+ }
53
+ },
54
+ "node_modules/abort-controller": {
55
+ "version": "3.0.0",
56
+ "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
57
+ "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
58
+ "license": "MIT",
59
+ "dependencies": {
60
+ "event-target-shim": "^5.0.0"
61
+ },
62
+ "engines": {
63
+ "node": ">=6.5"
64
+ }
65
+ },
66
+ "node_modules/accepts": {
67
+ "version": "1.3.8",
68
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
69
+ "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
70
+ "license": "MIT",
71
+ "dependencies": {
72
+ "mime-types": "~2.1.34",
73
+ "negotiator": "0.6.3"
74
+ },
75
+ "engines": {
76
+ "node": ">= 0.6"
77
+ }
78
+ },
79
+ "node_modules/agentkeepalive": {
80
+ "version": "4.6.0",
81
+ "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.6.0.tgz",
82
+ "integrity": "sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==",
83
+ "license": "MIT",
84
+ "dependencies": {
85
+ "humanize-ms": "^1.2.1"
86
+ },
87
+ "engines": {
88
+ "node": ">= 8.0.0"
89
+ }
90
+ },
91
+ "node_modules/anymatch": {
92
+ "version": "3.1.3",
93
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
94
+ "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
95
+ "dev": true,
96
+ "license": "ISC",
97
+ "dependencies": {
98
+ "normalize-path": "^3.0.0",
99
+ "picomatch": "^2.0.4"
100
+ },
101
+ "engines": {
102
+ "node": ">= 8"
103
+ }
104
+ },
105
+ "node_modules/array-flatten": {
106
+ "version": "1.1.1",
107
+ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
108
+ "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==",
109
+ "license": "MIT"
110
+ },
111
+ "node_modules/asynckit": {
112
+ "version": "0.4.0",
113
+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
114
+ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
115
+ "license": "MIT"
116
+ },
117
+ "node_modules/balanced-match": {
118
+ "version": "1.0.2",
119
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
120
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
121
+ "dev": true,
122
+ "license": "MIT"
123
+ },
124
+ "node_modules/binary-extensions": {
125
+ "version": "2.3.0",
126
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
127
+ "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
128
+ "dev": true,
129
+ "license": "MIT",
130
+ "engines": {
131
+ "node": ">=8"
132
+ },
133
+ "funding": {
134
+ "url": "https://github.com/sponsors/sindresorhus"
135
+ }
136
+ },
137
+ "node_modules/body-parser": {
138
+ "version": "1.20.3",
139
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz",
140
+ "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==",
141
+ "license": "MIT",
142
+ "dependencies": {
143
+ "bytes": "3.1.2",
144
+ "content-type": "~1.0.5",
145
+ "debug": "2.6.9",
146
+ "depd": "2.0.0",
147
+ "destroy": "1.2.0",
148
+ "http-errors": "2.0.0",
149
+ "iconv-lite": "0.4.24",
150
+ "on-finished": "2.4.1",
151
+ "qs": "6.13.0",
152
+ "raw-body": "2.5.2",
153
+ "type-is": "~1.6.18",
154
+ "unpipe": "1.0.0"
155
+ },
156
+ "engines": {
157
+ "node": ">= 0.8",
158
+ "npm": "1.2.8000 || >= 1.4.16"
159
+ }
160
+ },
161
+ "node_modules/brace-expansion": {
162
+ "version": "1.1.12",
163
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
164
+ "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
165
+ "dev": true,
166
+ "license": "MIT",
167
+ "dependencies": {
168
+ "balanced-match": "^1.0.0",
169
+ "concat-map": "0.0.1"
170
+ }
171
+ },
172
+ "node_modules/braces": {
173
+ "version": "3.0.3",
174
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
175
+ "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
176
+ "dev": true,
177
+ "license": "MIT",
178
+ "dependencies": {
179
+ "fill-range": "^7.1.1"
180
+ },
181
+ "engines": {
182
+ "node": ">=8"
183
+ }
184
+ },
185
+ "node_modules/bytes": {
186
+ "version": "3.1.2",
187
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
188
+ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
189
+ "license": "MIT",
190
+ "engines": {
191
+ "node": ">= 0.8"
192
+ }
193
+ },
194
+ "node_modules/call-bind-apply-helpers": {
195
+ "version": "1.0.2",
196
+ "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
197
+ "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
198
+ "license": "MIT",
199
+ "dependencies": {
200
+ "es-errors": "^1.3.0",
201
+ "function-bind": "^1.1.2"
202
+ },
203
+ "engines": {
204
+ "node": ">= 0.4"
205
+ }
206
+ },
207
+ "node_modules/call-bound": {
208
+ "version": "1.0.4",
209
+ "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
210
+ "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
211
+ "license": "MIT",
212
+ "dependencies": {
213
+ "call-bind-apply-helpers": "^1.0.2",
214
+ "get-intrinsic": "^1.3.0"
215
+ },
216
+ "engines": {
217
+ "node": ">= 0.4"
218
+ },
219
+ "funding": {
220
+ "url": "https://github.com/sponsors/ljharb"
221
+ }
222
+ },
223
+ "node_modules/chokidar": {
224
+ "version": "3.6.0",
225
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
226
+ "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
227
+ "dev": true,
228
+ "license": "MIT",
229
+ "dependencies": {
230
+ "anymatch": "~3.1.2",
231
+ "braces": "~3.0.2",
232
+ "glob-parent": "~5.1.2",
233
+ "is-binary-path": "~2.1.0",
234
+ "is-glob": "~4.0.1",
235
+ "normalize-path": "~3.0.0",
236
+ "readdirp": "~3.6.0"
237
+ },
238
+ "engines": {
239
+ "node": ">= 8.10.0"
240
+ },
241
+ "funding": {
242
+ "url": "https://paulmillr.com/funding/"
243
+ },
244
+ "optionalDependencies": {
245
+ "fsevents": "~2.3.2"
246
+ }
247
+ },
248
+ "node_modules/combined-stream": {
249
+ "version": "1.0.8",
250
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
251
+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
252
+ "license": "MIT",
253
+ "dependencies": {
254
+ "delayed-stream": "~1.0.0"
255
+ },
256
+ "engines": {
257
+ "node": ">= 0.8"
258
+ }
259
+ },
260
+ "node_modules/concat-map": {
261
+ "version": "0.0.1",
262
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
263
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
264
+ "dev": true,
265
+ "license": "MIT"
266
+ },
267
+ "node_modules/content-disposition": {
268
+ "version": "0.5.4",
269
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
270
+ "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
271
+ "license": "MIT",
272
+ "dependencies": {
273
+ "safe-buffer": "5.2.1"
274
+ },
275
+ "engines": {
276
+ "node": ">= 0.6"
277
+ }
278
+ },
279
+ "node_modules/content-type": {
280
+ "version": "1.0.5",
281
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
282
+ "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
283
+ "license": "MIT",
284
+ "engines": {
285
+ "node": ">= 0.6"
286
+ }
287
+ },
288
+ "node_modules/cookie": {
289
+ "version": "0.7.1",
290
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz",
291
+ "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==",
292
+ "license": "MIT",
293
+ "engines": {
294
+ "node": ">= 0.6"
295
+ }
296
+ },
297
+ "node_modules/cookie-signature": {
298
+ "version": "1.0.6",
299
+ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
300
+ "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==",
301
+ "license": "MIT"
302
+ },
303
+ "node_modules/cors": {
304
+ "version": "2.8.5",
305
+ "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
306
+ "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
307
+ "license": "MIT",
308
+ "dependencies": {
309
+ "object-assign": "^4",
310
+ "vary": "^1"
311
+ },
312
+ "engines": {
313
+ "node": ">= 0.10"
314
+ }
315
+ },
316
+ "node_modules/debug": {
317
+ "version": "2.6.9",
318
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
319
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
320
+ "license": "MIT",
321
+ "dependencies": {
322
+ "ms": "2.0.0"
323
+ }
324
+ },
325
+ "node_modules/delayed-stream": {
326
+ "version": "1.0.0",
327
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
328
+ "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
329
+ "license": "MIT",
330
+ "engines": {
331
+ "node": ">=0.4.0"
332
+ }
333
+ },
334
+ "node_modules/depd": {
335
+ "version": "2.0.0",
336
+ "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
337
+ "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
338
+ "license": "MIT",
339
+ "engines": {
340
+ "node": ">= 0.8"
341
+ }
342
+ },
343
+ "node_modules/destroy": {
344
+ "version": "1.2.0",
345
+ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
346
+ "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
347
+ "license": "MIT",
348
+ "engines": {
349
+ "node": ">= 0.8",
350
+ "npm": "1.2.8000 || >= 1.4.16"
351
+ }
352
+ },
353
+ "node_modules/dotenv": {
354
+ "version": "16.5.0",
355
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.5.0.tgz",
356
+ "integrity": "sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg==",
357
+ "license": "BSD-2-Clause",
358
+ "engines": {
359
+ "node": ">=12"
360
+ },
361
+ "funding": {
362
+ "url": "https://dotenvx.com"
363
+ }
364
+ },
365
+ "node_modules/dunder-proto": {
366
+ "version": "1.0.1",
367
+ "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
368
+ "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
369
+ "license": "MIT",
370
+ "dependencies": {
371
+ "call-bind-apply-helpers": "^1.0.1",
372
+ "es-errors": "^1.3.0",
373
+ "gopd": "^1.2.0"
374
+ },
375
+ "engines": {
376
+ "node": ">= 0.4"
377
+ }
378
+ },
379
+ "node_modules/ee-first": {
380
+ "version": "1.1.1",
381
+ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
382
+ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
383
+ "license": "MIT"
384
+ },
385
+ "node_modules/encodeurl": {
386
+ "version": "2.0.0",
387
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
388
+ "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
389
+ "license": "MIT",
390
+ "engines": {
391
+ "node": ">= 0.8"
392
+ }
393
+ },
394
+ "node_modules/es-define-property": {
395
+ "version": "1.0.1",
396
+ "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
397
+ "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
398
+ "license": "MIT",
399
+ "engines": {
400
+ "node": ">= 0.4"
401
+ }
402
+ },
403
+ "node_modules/es-errors": {
404
+ "version": "1.3.0",
405
+ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
406
+ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
407
+ "license": "MIT",
408
+ "engines": {
409
+ "node": ">= 0.4"
410
+ }
411
+ },
412
+ "node_modules/es-object-atoms": {
413
+ "version": "1.1.1",
414
+ "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
415
+ "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
416
+ "license": "MIT",
417
+ "dependencies": {
418
+ "es-errors": "^1.3.0"
419
+ },
420
+ "engines": {
421
+ "node": ">= 0.4"
422
+ }
423
+ },
424
+ "node_modules/es-set-tostringtag": {
425
+ "version": "2.1.0",
426
+ "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",
427
+ "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",
428
+ "license": "MIT",
429
+ "dependencies": {
430
+ "es-errors": "^1.3.0",
431
+ "get-intrinsic": "^1.2.6",
432
+ "has-tostringtag": "^1.0.2",
433
+ "hasown": "^2.0.2"
434
+ },
435
+ "engines": {
436
+ "node": ">= 0.4"
437
+ }
438
+ },
439
+ "node_modules/escape-html": {
440
+ "version": "1.0.3",
441
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
442
+ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
443
+ "license": "MIT"
444
+ },
445
+ "node_modules/etag": {
446
+ "version": "1.8.1",
447
+ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
448
+ "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
449
+ "license": "MIT",
450
+ "engines": {
451
+ "node": ">= 0.6"
452
+ }
453
+ },
454
+ "node_modules/event-target-shim": {
455
+ "version": "5.0.1",
456
+ "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
457
+ "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
458
+ "license": "MIT",
459
+ "engines": {
460
+ "node": ">=6"
461
+ }
462
+ },
463
+ "node_modules/express": {
464
+ "version": "4.21.2",
465
+ "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz",
466
+ "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==",
467
+ "license": "MIT",
468
+ "dependencies": {
469
+ "accepts": "~1.3.8",
470
+ "array-flatten": "1.1.1",
471
+ "body-parser": "1.20.3",
472
+ "content-disposition": "0.5.4",
473
+ "content-type": "~1.0.4",
474
+ "cookie": "0.7.1",
475
+ "cookie-signature": "1.0.6",
476
+ "debug": "2.6.9",
477
+ "depd": "2.0.0",
478
+ "encodeurl": "~2.0.0",
479
+ "escape-html": "~1.0.3",
480
+ "etag": "~1.8.1",
481
+ "finalhandler": "1.3.1",
482
+ "fresh": "0.5.2",
483
+ "http-errors": "2.0.0",
484
+ "merge-descriptors": "1.0.3",
485
+ "methods": "~1.1.2",
486
+ "on-finished": "2.4.1",
487
+ "parseurl": "~1.3.3",
488
+ "path-to-regexp": "0.1.12",
489
+ "proxy-addr": "~2.0.7",
490
+ "qs": "6.13.0",
491
+ "range-parser": "~1.2.1",
492
+ "safe-buffer": "5.2.1",
493
+ "send": "0.19.0",
494
+ "serve-static": "1.16.2",
495
+ "setprototypeof": "1.2.0",
496
+ "statuses": "2.0.1",
497
+ "type-is": "~1.6.18",
498
+ "utils-merge": "1.0.1",
499
+ "vary": "~1.1.2"
500
+ },
501
+ "engines": {
502
+ "node": ">= 0.10.0"
503
+ },
504
+ "funding": {
505
+ "type": "opencollective",
506
+ "url": "https://opencollective.com/express"
507
+ }
508
+ },
509
+ "node_modules/fill-range": {
510
+ "version": "7.1.1",
511
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
512
+ "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
513
+ "dev": true,
514
+ "license": "MIT",
515
+ "dependencies": {
516
+ "to-regex-range": "^5.0.1"
517
+ },
518
+ "engines": {
519
+ "node": ">=8"
520
+ }
521
+ },
522
+ "node_modules/finalhandler": {
523
+ "version": "1.3.1",
524
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz",
525
+ "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==",
526
+ "license": "MIT",
527
+ "dependencies": {
528
+ "debug": "2.6.9",
529
+ "encodeurl": "~2.0.0",
530
+ "escape-html": "~1.0.3",
531
+ "on-finished": "2.4.1",
532
+ "parseurl": "~1.3.3",
533
+ "statuses": "2.0.1",
534
+ "unpipe": "~1.0.0"
535
+ },
536
+ "engines": {
537
+ "node": ">= 0.8"
538
+ }
539
+ },
540
+ "node_modules/form-data": {
541
+ "version": "4.0.3",
542
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.3.tgz",
543
+ "integrity": "sha512-qsITQPfmvMOSAdeyZ+12I1c+CKSstAFAwu+97zrnWAbIr5u8wfsExUzCesVLC8NgHuRUqNN4Zy6UPWUTRGslcA==",
544
+ "license": "MIT",
545
+ "dependencies": {
546
+ "asynckit": "^0.4.0",
547
+ "combined-stream": "^1.0.8",
548
+ "es-set-tostringtag": "^2.1.0",
549
+ "hasown": "^2.0.2",
550
+ "mime-types": "^2.1.12"
551
+ },
552
+ "engines": {
553
+ "node": ">= 6"
554
+ }
555
+ },
556
+ "node_modules/form-data-encoder": {
557
+ "version": "1.7.2",
558
+ "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.2.tgz",
559
+ "integrity": "sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==",
560
+ "license": "MIT"
561
+ },
562
+ "node_modules/formdata-node": {
563
+ "version": "4.4.1",
564
+ "resolved": "https://registry.npmjs.org/formdata-node/-/formdata-node-4.4.1.tgz",
565
+ "integrity": "sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==",
566
+ "license": "MIT",
567
+ "dependencies": {
568
+ "node-domexception": "1.0.0",
569
+ "web-streams-polyfill": "4.0.0-beta.3"
570
+ },
571
+ "engines": {
572
+ "node": ">= 12.20"
573
+ }
574
+ },
575
+ "node_modules/forwarded": {
576
+ "version": "0.2.0",
577
+ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
578
+ "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
579
+ "license": "MIT",
580
+ "engines": {
581
+ "node": ">= 0.6"
582
+ }
583
+ },
584
+ "node_modules/fresh": {
585
+ "version": "0.5.2",
586
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
587
+ "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
588
+ "license": "MIT",
589
+ "engines": {
590
+ "node": ">= 0.6"
591
+ }
592
+ },
593
+ "node_modules/function-bind": {
594
+ "version": "1.1.2",
595
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
596
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
597
+ "license": "MIT",
598
+ "funding": {
599
+ "url": "https://github.com/sponsors/ljharb"
600
+ }
601
+ },
602
+ "node_modules/get-intrinsic": {
603
+ "version": "1.3.0",
604
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
605
+ "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
606
+ "license": "MIT",
607
+ "dependencies": {
608
+ "call-bind-apply-helpers": "^1.0.2",
609
+ "es-define-property": "^1.0.1",
610
+ "es-errors": "^1.3.0",
611
+ "es-object-atoms": "^1.1.1",
612
+ "function-bind": "^1.1.2",
613
+ "get-proto": "^1.0.1",
614
+ "gopd": "^1.2.0",
615
+ "has-symbols": "^1.1.0",
616
+ "hasown": "^2.0.2",
617
+ "math-intrinsics": "^1.1.0"
618
+ },
619
+ "engines": {
620
+ "node": ">= 0.4"
621
+ },
622
+ "funding": {
623
+ "url": "https://github.com/sponsors/ljharb"
624
+ }
625
+ },
626
+ "node_modules/get-proto": {
627
+ "version": "1.0.1",
628
+ "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
629
+ "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
630
+ "license": "MIT",
631
+ "dependencies": {
632
+ "dunder-proto": "^1.0.1",
633
+ "es-object-atoms": "^1.0.0"
634
+ },
635
+ "engines": {
636
+ "node": ">= 0.4"
637
+ }
638
+ },
639
+ "node_modules/glob-parent": {
640
+ "version": "5.1.2",
641
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
642
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
643
+ "dev": true,
644
+ "license": "ISC",
645
+ "dependencies": {
646
+ "is-glob": "^4.0.1"
647
+ },
648
+ "engines": {
649
+ "node": ">= 6"
650
+ }
651
+ },
652
+ "node_modules/gopd": {
653
+ "version": "1.2.0",
654
+ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
655
+ "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
656
+ "license": "MIT",
657
+ "engines": {
658
+ "node": ">= 0.4"
659
+ },
660
+ "funding": {
661
+ "url": "https://github.com/sponsors/ljharb"
662
+ }
663
+ },
664
+ "node_modules/has-flag": {
665
+ "version": "3.0.0",
666
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
667
+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
668
+ "dev": true,
669
+ "license": "MIT",
670
+ "engines": {
671
+ "node": ">=4"
672
+ }
673
+ },
674
+ "node_modules/has-symbols": {
675
+ "version": "1.1.0",
676
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
677
+ "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
678
+ "license": "MIT",
679
+ "engines": {
680
+ "node": ">= 0.4"
681
+ },
682
+ "funding": {
683
+ "url": "https://github.com/sponsors/ljharb"
684
+ }
685
+ },
686
+ "node_modules/has-tostringtag": {
687
+ "version": "1.0.2",
688
+ "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
689
+ "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
690
+ "license": "MIT",
691
+ "dependencies": {
692
+ "has-symbols": "^1.0.3"
693
+ },
694
+ "engines": {
695
+ "node": ">= 0.4"
696
+ },
697
+ "funding": {
698
+ "url": "https://github.com/sponsors/ljharb"
699
+ }
700
+ },
701
+ "node_modules/hasown": {
702
+ "version": "2.0.2",
703
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
704
+ "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
705
+ "license": "MIT",
706
+ "dependencies": {
707
+ "function-bind": "^1.1.2"
708
+ },
709
+ "engines": {
710
+ "node": ">= 0.4"
711
+ }
712
+ },
713
+ "node_modules/http-errors": {
714
+ "version": "2.0.0",
715
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
716
+ "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
717
+ "license": "MIT",
718
+ "dependencies": {
719
+ "depd": "2.0.0",
720
+ "inherits": "2.0.4",
721
+ "setprototypeof": "1.2.0",
722
+ "statuses": "2.0.1",
723
+ "toidentifier": "1.0.1"
724
+ },
725
+ "engines": {
726
+ "node": ">= 0.8"
727
+ }
728
+ },
729
+ "node_modules/humanize-ms": {
730
+ "version": "1.2.1",
731
+ "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz",
732
+ "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==",
733
+ "license": "MIT",
734
+ "dependencies": {
735
+ "ms": "^2.0.0"
736
+ }
737
+ },
738
+ "node_modules/iconv-lite": {
739
+ "version": "0.4.24",
740
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
741
+ "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
742
+ "license": "MIT",
743
+ "dependencies": {
744
+ "safer-buffer": ">= 2.1.2 < 3"
745
+ },
746
+ "engines": {
747
+ "node": ">=0.10.0"
748
+ }
749
+ },
750
+ "node_modules/ignore-by-default": {
751
+ "version": "1.0.1",
752
+ "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
753
+ "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==",
754
+ "dev": true,
755
+ "license": "ISC"
756
+ },
757
+ "node_modules/inherits": {
758
+ "version": "2.0.4",
759
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
760
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
761
+ "license": "ISC"
762
+ },
763
+ "node_modules/ipaddr.js": {
764
+ "version": "1.9.1",
765
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
766
+ "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
767
+ "license": "MIT",
768
+ "engines": {
769
+ "node": ">= 0.10"
770
+ }
771
+ },
772
+ "node_modules/is-binary-path": {
773
+ "version": "2.1.0",
774
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
775
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
776
+ "dev": true,
777
+ "license": "MIT",
778
+ "dependencies": {
779
+ "binary-extensions": "^2.0.0"
780
+ },
781
+ "engines": {
782
+ "node": ">=8"
783
+ }
784
+ },
785
+ "node_modules/is-extglob": {
786
+ "version": "2.1.1",
787
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
788
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
789
+ "dev": true,
790
+ "license": "MIT",
791
+ "engines": {
792
+ "node": ">=0.10.0"
793
+ }
794
+ },
795
+ "node_modules/is-glob": {
796
+ "version": "4.0.3",
797
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
798
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
799
+ "dev": true,
800
+ "license": "MIT",
801
+ "dependencies": {
802
+ "is-extglob": "^2.1.1"
803
+ },
804
+ "engines": {
805
+ "node": ">=0.10.0"
806
+ }
807
+ },
808
+ "node_modules/is-number": {
809
+ "version": "7.0.0",
810
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
811
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
812
+ "dev": true,
813
+ "license": "MIT",
814
+ "engines": {
815
+ "node": ">=0.12.0"
816
+ }
817
+ },
818
+ "node_modules/math-intrinsics": {
819
+ "version": "1.1.0",
820
+ "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
821
+ "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
822
+ "license": "MIT",
823
+ "engines": {
824
+ "node": ">= 0.4"
825
+ }
826
+ },
827
+ "node_modules/media-typer": {
828
+ "version": "0.3.0",
829
+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
830
+ "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
831
+ "license": "MIT",
832
+ "engines": {
833
+ "node": ">= 0.6"
834
+ }
835
+ },
836
+ "node_modules/merge-descriptors": {
837
+ "version": "1.0.3",
838
+ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz",
839
+ "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==",
840
+ "license": "MIT",
841
+ "funding": {
842
+ "url": "https://github.com/sponsors/sindresorhus"
843
+ }
844
+ },
845
+ "node_modules/methods": {
846
+ "version": "1.1.2",
847
+ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
848
+ "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
849
+ "license": "MIT",
850
+ "engines": {
851
+ "node": ">= 0.6"
852
+ }
853
+ },
854
+ "node_modules/mime": {
855
+ "version": "1.6.0",
856
+ "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
857
+ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
858
+ "license": "MIT",
859
+ "bin": {
860
+ "mime": "cli.js"
861
+ },
862
+ "engines": {
863
+ "node": ">=4"
864
+ }
865
+ },
866
+ "node_modules/mime-db": {
867
+ "version": "1.52.0",
868
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
869
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
870
+ "license": "MIT",
871
+ "engines": {
872
+ "node": ">= 0.6"
873
+ }
874
+ },
875
+ "node_modules/mime-types": {
876
+ "version": "2.1.35",
877
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
878
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
879
+ "license": "MIT",
880
+ "dependencies": {
881
+ "mime-db": "1.52.0"
882
+ },
883
+ "engines": {
884
+ "node": ">= 0.6"
885
+ }
886
+ },
887
+ "node_modules/minimatch": {
888
+ "version": "3.1.2",
889
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
890
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
891
+ "dev": true,
892
+ "license": "ISC",
893
+ "dependencies": {
894
+ "brace-expansion": "^1.1.7"
895
+ },
896
+ "engines": {
897
+ "node": "*"
898
+ }
899
+ },
900
+ "node_modules/ms": {
901
+ "version": "2.0.0",
902
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
903
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
904
+ "license": "MIT"
905
+ },
906
+ "node_modules/negotiator": {
907
+ "version": "0.6.3",
908
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
909
+ "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
910
+ "license": "MIT",
911
+ "engines": {
912
+ "node": ">= 0.6"
913
+ }
914
+ },
915
+ "node_modules/node-domexception": {
916
+ "version": "1.0.0",
917
+ "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
918
+ "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==",
919
+ "deprecated": "Use your platform's native DOMException instead",
920
+ "funding": [
921
+ {
922
+ "type": "github",
923
+ "url": "https://github.com/sponsors/jimmywarting"
924
+ },
925
+ {
926
+ "type": "github",
927
+ "url": "https://paypal.me/jimmywarting"
928
+ }
929
+ ],
930
+ "license": "MIT",
931
+ "engines": {
932
+ "node": ">=10.5.0"
933
+ }
934
+ },
935
+ "node_modules/node-fetch": {
936
+ "version": "2.7.0",
937
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
938
+ "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
939
+ "license": "MIT",
940
+ "dependencies": {
941
+ "whatwg-url": "^5.0.0"
942
+ },
943
+ "engines": {
944
+ "node": "4.x || >=6.0.0"
945
+ },
946
+ "peerDependencies": {
947
+ "encoding": "^0.1.0"
948
+ },
949
+ "peerDependenciesMeta": {
950
+ "encoding": {
951
+ "optional": true
952
+ }
953
+ }
954
+ },
955
+ "node_modules/nodemon": {
956
+ "version": "3.1.10",
957
+ "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.10.tgz",
958
+ "integrity": "sha512-WDjw3pJ0/0jMFmyNDp3gvY2YizjLmmOUQo6DEBY+JgdvW/yQ9mEeSw6H5ythl5Ny2ytb7f9C2nIbjSxMNzbJXw==",
959
+ "dev": true,
960
+ "license": "MIT",
961
+ "dependencies": {
962
+ "chokidar": "^3.5.2",
963
+ "debug": "^4",
964
+ "ignore-by-default": "^1.0.1",
965
+ "minimatch": "^3.1.2",
966
+ "pstree.remy": "^1.1.8",
967
+ "semver": "^7.5.3",
968
+ "simple-update-notifier": "^2.0.0",
969
+ "supports-color": "^5.5.0",
970
+ "touch": "^3.1.0",
971
+ "undefsafe": "^2.0.5"
972
+ },
973
+ "bin": {
974
+ "nodemon": "bin/nodemon.js"
975
+ },
976
+ "engines": {
977
+ "node": ">=10"
978
+ },
979
+ "funding": {
980
+ "type": "opencollective",
981
+ "url": "https://opencollective.com/nodemon"
982
+ }
983
+ },
984
+ "node_modules/nodemon/node_modules/debug": {
985
+ "version": "4.4.1",
986
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz",
987
+ "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==",
988
+ "dev": true,
989
+ "license": "MIT",
990
+ "dependencies": {
991
+ "ms": "^2.1.3"
992
+ },
993
+ "engines": {
994
+ "node": ">=6.0"
995
+ },
996
+ "peerDependenciesMeta": {
997
+ "supports-color": {
998
+ "optional": true
999
+ }
1000
+ }
1001
+ },
1002
+ "node_modules/nodemon/node_modules/ms": {
1003
+ "version": "2.1.3",
1004
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
1005
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
1006
+ "dev": true,
1007
+ "license": "MIT"
1008
+ },
1009
+ "node_modules/normalize-path": {
1010
+ "version": "3.0.0",
1011
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
1012
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
1013
+ "dev": true,
1014
+ "license": "MIT",
1015
+ "engines": {
1016
+ "node": ">=0.10.0"
1017
+ }
1018
+ },
1019
+ "node_modules/object-assign": {
1020
+ "version": "4.1.1",
1021
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
1022
+ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
1023
+ "license": "MIT",
1024
+ "engines": {
1025
+ "node": ">=0.10.0"
1026
+ }
1027
+ },
1028
+ "node_modules/object-inspect": {
1029
+ "version": "1.13.4",
1030
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
1031
+ "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
1032
+ "license": "MIT",
1033
+ "engines": {
1034
+ "node": ">= 0.4"
1035
+ },
1036
+ "funding": {
1037
+ "url": "https://github.com/sponsors/ljharb"
1038
+ }
1039
+ },
1040
+ "node_modules/on-finished": {
1041
+ "version": "2.4.1",
1042
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
1043
+ "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
1044
+ "license": "MIT",
1045
+ "dependencies": {
1046
+ "ee-first": "1.1.1"
1047
+ },
1048
+ "engines": {
1049
+ "node": ">= 0.8"
1050
+ }
1051
+ },
1052
+ "node_modules/openai": {
1053
+ "version": "4.104.0",
1054
+ "resolved": "https://registry.npmjs.org/openai/-/openai-4.104.0.tgz",
1055
+ "integrity": "sha512-p99EFNsA/yX6UhVO93f5kJsDRLAg+CTA2RBqdHK4RtK8u5IJw32Hyb2dTGKbnnFmnuoBv5r7Z2CURI9sGZpSuA==",
1056
+ "license": "Apache-2.0",
1057
+ "dependencies": {
1058
+ "@types/node": "^18.11.18",
1059
+ "@types/node-fetch": "^2.6.4",
1060
+ "abort-controller": "^3.0.0",
1061
+ "agentkeepalive": "^4.2.1",
1062
+ "form-data-encoder": "1.7.2",
1063
+ "formdata-node": "^4.3.2",
1064
+ "node-fetch": "^2.6.7"
1065
+ },
1066
+ "bin": {
1067
+ "openai": "bin/cli"
1068
+ },
1069
+ "peerDependencies": {
1070
+ "ws": "^8.18.0",
1071
+ "zod": "^3.23.8"
1072
+ },
1073
+ "peerDependenciesMeta": {
1074
+ "ws": {
1075
+ "optional": true
1076
+ },
1077
+ "zod": {
1078
+ "optional": true
1079
+ }
1080
+ }
1081
+ },
1082
+ "node_modules/parseurl": {
1083
+ "version": "1.3.3",
1084
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
1085
+ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
1086
+ "license": "MIT",
1087
+ "engines": {
1088
+ "node": ">= 0.8"
1089
+ }
1090
+ },
1091
+ "node_modules/path-to-regexp": {
1092
+ "version": "0.1.12",
1093
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz",
1094
+ "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==",
1095
+ "license": "MIT"
1096
+ },
1097
+ "node_modules/picomatch": {
1098
+ "version": "2.3.1",
1099
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
1100
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
1101
+ "dev": true,
1102
+ "license": "MIT",
1103
+ "engines": {
1104
+ "node": ">=8.6"
1105
+ },
1106
+ "funding": {
1107
+ "url": "https://github.com/sponsors/jonschlinkert"
1108
+ }
1109
+ },
1110
+ "node_modules/proxy-addr": {
1111
+ "version": "2.0.7",
1112
+ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
1113
+ "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
1114
+ "license": "MIT",
1115
+ "dependencies": {
1116
+ "forwarded": "0.2.0",
1117
+ "ipaddr.js": "1.9.1"
1118
+ },
1119
+ "engines": {
1120
+ "node": ">= 0.10"
1121
+ }
1122
+ },
1123
+ "node_modules/pstree.remy": {
1124
+ "version": "1.1.8",
1125
+ "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
1126
+ "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==",
1127
+ "dev": true,
1128
+ "license": "MIT"
1129
+ },
1130
+ "node_modules/qs": {
1131
+ "version": "6.13.0",
1132
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz",
1133
+ "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==",
1134
+ "license": "BSD-3-Clause",
1135
+ "dependencies": {
1136
+ "side-channel": "^1.0.6"
1137
+ },
1138
+ "engines": {
1139
+ "node": ">=0.6"
1140
+ },
1141
+ "funding": {
1142
+ "url": "https://github.com/sponsors/ljharb"
1143
+ }
1144
+ },
1145
+ "node_modules/range-parser": {
1146
+ "version": "1.2.1",
1147
+ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
1148
+ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
1149
+ "license": "MIT",
1150
+ "engines": {
1151
+ "node": ">= 0.6"
1152
+ }
1153
+ },
1154
+ "node_modules/raw-body": {
1155
+ "version": "2.5.2",
1156
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz",
1157
+ "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==",
1158
+ "license": "MIT",
1159
+ "dependencies": {
1160
+ "bytes": "3.1.2",
1161
+ "http-errors": "2.0.0",
1162
+ "iconv-lite": "0.4.24",
1163
+ "unpipe": "1.0.0"
1164
+ },
1165
+ "engines": {
1166
+ "node": ">= 0.8"
1167
+ }
1168
+ },
1169
+ "node_modules/readdirp": {
1170
+ "version": "3.6.0",
1171
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
1172
+ "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
1173
+ "dev": true,
1174
+ "license": "MIT",
1175
+ "dependencies": {
1176
+ "picomatch": "^2.2.1"
1177
+ },
1178
+ "engines": {
1179
+ "node": ">=8.10.0"
1180
+ }
1181
+ },
1182
+ "node_modules/safe-buffer": {
1183
+ "version": "5.2.1",
1184
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
1185
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
1186
+ "funding": [
1187
+ {
1188
+ "type": "github",
1189
+ "url": "https://github.com/sponsors/feross"
1190
+ },
1191
+ {
1192
+ "type": "patreon",
1193
+ "url": "https://www.patreon.com/feross"
1194
+ },
1195
+ {
1196
+ "type": "consulting",
1197
+ "url": "https://feross.org/support"
1198
+ }
1199
+ ],
1200
+ "license": "MIT"
1201
+ },
1202
+ "node_modules/safer-buffer": {
1203
+ "version": "2.1.2",
1204
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
1205
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
1206
+ "license": "MIT"
1207
+ },
1208
+ "node_modules/semver": {
1209
+ "version": "7.7.2",
1210
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
1211
+ "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
1212
+ "dev": true,
1213
+ "license": "ISC",
1214
+ "bin": {
1215
+ "semver": "bin/semver.js"
1216
+ },
1217
+ "engines": {
1218
+ "node": ">=10"
1219
+ }
1220
+ },
1221
+ "node_modules/send": {
1222
+ "version": "0.19.0",
1223
+ "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz",
1224
+ "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==",
1225
+ "license": "MIT",
1226
+ "dependencies": {
1227
+ "debug": "2.6.9",
1228
+ "depd": "2.0.0",
1229
+ "destroy": "1.2.0",
1230
+ "encodeurl": "~1.0.2",
1231
+ "escape-html": "~1.0.3",
1232
+ "etag": "~1.8.1",
1233
+ "fresh": "0.5.2",
1234
+ "http-errors": "2.0.0",
1235
+ "mime": "1.6.0",
1236
+ "ms": "2.1.3",
1237
+ "on-finished": "2.4.1",
1238
+ "range-parser": "~1.2.1",
1239
+ "statuses": "2.0.1"
1240
+ },
1241
+ "engines": {
1242
+ "node": ">= 0.8.0"
1243
+ }
1244
+ },
1245
+ "node_modules/send/node_modules/encodeurl": {
1246
+ "version": "1.0.2",
1247
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
1248
+ "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
1249
+ "license": "MIT",
1250
+ "engines": {
1251
+ "node": ">= 0.8"
1252
+ }
1253
+ },
1254
+ "node_modules/send/node_modules/ms": {
1255
+ "version": "2.1.3",
1256
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
1257
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
1258
+ "license": "MIT"
1259
+ },
1260
+ "node_modules/serve-static": {
1261
+ "version": "1.16.2",
1262
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz",
1263
+ "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==",
1264
+ "license": "MIT",
1265
+ "dependencies": {
1266
+ "encodeurl": "~2.0.0",
1267
+ "escape-html": "~1.0.3",
1268
+ "parseurl": "~1.3.3",
1269
+ "send": "0.19.0"
1270
+ },
1271
+ "engines": {
1272
+ "node": ">= 0.8.0"
1273
+ }
1274
+ },
1275
+ "node_modules/setprototypeof": {
1276
+ "version": "1.2.0",
1277
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
1278
+ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
1279
+ "license": "ISC"
1280
+ },
1281
+ "node_modules/side-channel": {
1282
+ "version": "1.1.0",
1283
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
1284
+ "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
1285
+ "license": "MIT",
1286
+ "dependencies": {
1287
+ "es-errors": "^1.3.0",
1288
+ "object-inspect": "^1.13.3",
1289
+ "side-channel-list": "^1.0.0",
1290
+ "side-channel-map": "^1.0.1",
1291
+ "side-channel-weakmap": "^1.0.2"
1292
+ },
1293
+ "engines": {
1294
+ "node": ">= 0.4"
1295
+ },
1296
+ "funding": {
1297
+ "url": "https://github.com/sponsors/ljharb"
1298
+ }
1299
+ },
1300
+ "node_modules/side-channel-list": {
1301
+ "version": "1.0.0",
1302
+ "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz",
1303
+ "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",
1304
+ "license": "MIT",
1305
+ "dependencies": {
1306
+ "es-errors": "^1.3.0",
1307
+ "object-inspect": "^1.13.3"
1308
+ },
1309
+ "engines": {
1310
+ "node": ">= 0.4"
1311
+ },
1312
+ "funding": {
1313
+ "url": "https://github.com/sponsors/ljharb"
1314
+ }
1315
+ },
1316
+ "node_modules/side-channel-map": {
1317
+ "version": "1.0.1",
1318
+ "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
1319
+ "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
1320
+ "license": "MIT",
1321
+ "dependencies": {
1322
+ "call-bound": "^1.0.2",
1323
+ "es-errors": "^1.3.0",
1324
+ "get-intrinsic": "^1.2.5",
1325
+ "object-inspect": "^1.13.3"
1326
+ },
1327
+ "engines": {
1328
+ "node": ">= 0.4"
1329
+ },
1330
+ "funding": {
1331
+ "url": "https://github.com/sponsors/ljharb"
1332
+ }
1333
+ },
1334
+ "node_modules/side-channel-weakmap": {
1335
+ "version": "1.0.2",
1336
+ "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
1337
+ "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
1338
+ "license": "MIT",
1339
+ "dependencies": {
1340
+ "call-bound": "^1.0.2",
1341
+ "es-errors": "^1.3.0",
1342
+ "get-intrinsic": "^1.2.5",
1343
+ "object-inspect": "^1.13.3",
1344
+ "side-channel-map": "^1.0.1"
1345
+ },
1346
+ "engines": {
1347
+ "node": ">= 0.4"
1348
+ },
1349
+ "funding": {
1350
+ "url": "https://github.com/sponsors/ljharb"
1351
+ }
1352
+ },
1353
+ "node_modules/simple-update-notifier": {
1354
+ "version": "2.0.0",
1355
+ "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz",
1356
+ "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==",
1357
+ "dev": true,
1358
+ "license": "MIT",
1359
+ "dependencies": {
1360
+ "semver": "^7.5.3"
1361
+ },
1362
+ "engines": {
1363
+ "node": ">=10"
1364
+ }
1365
+ },
1366
+ "node_modules/statuses": {
1367
+ "version": "2.0.1",
1368
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
1369
+ "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
1370
+ "license": "MIT",
1371
+ "engines": {
1372
+ "node": ">= 0.8"
1373
+ }
1374
+ },
1375
+ "node_modules/supports-color": {
1376
+ "version": "5.5.0",
1377
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
1378
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
1379
+ "dev": true,
1380
+ "license": "MIT",
1381
+ "dependencies": {
1382
+ "has-flag": "^3.0.0"
1383
+ },
1384
+ "engines": {
1385
+ "node": ">=4"
1386
+ }
1387
+ },
1388
+ "node_modules/to-regex-range": {
1389
+ "version": "5.0.1",
1390
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
1391
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
1392
+ "dev": true,
1393
+ "license": "MIT",
1394
+ "dependencies": {
1395
+ "is-number": "^7.0.0"
1396
+ },
1397
+ "engines": {
1398
+ "node": ">=8.0"
1399
+ }
1400
+ },
1401
+ "node_modules/toidentifier": {
1402
+ "version": "1.0.1",
1403
+ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
1404
+ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
1405
+ "license": "MIT",
1406
+ "engines": {
1407
+ "node": ">=0.6"
1408
+ }
1409
+ },
1410
+ "node_modules/touch": {
1411
+ "version": "3.1.1",
1412
+ "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz",
1413
+ "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==",
1414
+ "dev": true,
1415
+ "license": "ISC",
1416
+ "bin": {
1417
+ "nodetouch": "bin/nodetouch.js"
1418
+ }
1419
+ },
1420
+ "node_modules/tr46": {
1421
+ "version": "0.0.3",
1422
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
1423
+ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
1424
+ "license": "MIT"
1425
+ },
1426
+ "node_modules/type-is": {
1427
+ "version": "1.6.18",
1428
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
1429
+ "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
1430
+ "license": "MIT",
1431
+ "dependencies": {
1432
+ "media-typer": "0.3.0",
1433
+ "mime-types": "~2.1.24"
1434
+ },
1435
+ "engines": {
1436
+ "node": ">= 0.6"
1437
+ }
1438
+ },
1439
+ "node_modules/undefsafe": {
1440
+ "version": "2.0.5",
1441
+ "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",
1442
+ "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==",
1443
+ "dev": true,
1444
+ "license": "MIT"
1445
+ },
1446
+ "node_modules/undici-types": {
1447
+ "version": "5.26.5",
1448
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
1449
+ "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
1450
+ "license": "MIT"
1451
+ },
1452
+ "node_modules/unpipe": {
1453
+ "version": "1.0.0",
1454
+ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
1455
+ "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
1456
+ "license": "MIT",
1457
+ "engines": {
1458
+ "node": ">= 0.8"
1459
+ }
1460
+ },
1461
+ "node_modules/utils-merge": {
1462
+ "version": "1.0.1",
1463
+ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
1464
+ "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
1465
+ "license": "MIT",
1466
+ "engines": {
1467
+ "node": ">= 0.4.0"
1468
+ }
1469
+ },
1470
+ "node_modules/vary": {
1471
+ "version": "1.1.2",
1472
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
1473
+ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
1474
+ "license": "MIT",
1475
+ "engines": {
1476
+ "node": ">= 0.8"
1477
+ }
1478
+ },
1479
+ "node_modules/web-streams-polyfill": {
1480
+ "version": "4.0.0-beta.3",
1481
+ "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz",
1482
+ "integrity": "sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==",
1483
+ "license": "MIT",
1484
+ "engines": {
1485
+ "node": ">= 14"
1486
+ }
1487
+ },
1488
+ "node_modules/webidl-conversions": {
1489
+ "version": "3.0.1",
1490
+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
1491
+ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
1492
+ "license": "BSD-2-Clause"
1493
+ },
1494
+ "node_modules/whatwg-url": {
1495
+ "version": "5.0.0",
1496
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
1497
+ "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
1498
+ "license": "MIT",
1499
+ "dependencies": {
1500
+ "tr46": "~0.0.3",
1501
+ "webidl-conversions": "^3.0.0"
1502
+ }
1503
+ }
1504
+ }
1505
+ }
node_modules/@huggingface/inference/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Tim Mikeladze and the Hugging Face team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
node_modules/@huggingface/inference/README.md ADDED
@@ -0,0 +1,759 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 🤗 Hugging Face Inference
2
+
3
+ A Typescript powered wrapper that provides a unified interface to run inference across multiple services for models hosted on the Hugging Face Hub:
4
+
5
+ 1. [Inference Providers](https://huggingface.co/docs/inference-providers/index): a streamlined, unified access to hundreds of machine learning models, powered by our serverless inference partners. This new approach builds on our previous Serverless Inference API, offering more models, improved performance, and greater reliability thanks to world-class providers. Refer to the [documentation](https://huggingface.co/docs/inference-providers/index#partners) for a list of supported providers.
6
+ 2. [Inference Endpoints](https://huggingface.co/docs/inference-endpoints/index): a product to easily deploy models to production. Inference is run by Hugging Face in a dedicated, fully managed infrastructure on a cloud provider of your choice.
7
+ 3. Local endpoints: you can also run inference with local inference servers like [llama.cpp](https://github.com/ggerganov/llama.cpp), [Ollama](https://ollama.com/), [vLLM](https://github.com/vllm-project/vllm), [LiteLLM](https://docs.litellm.ai/docs/simple_proxy), or [Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) by connecting the client to these local endpoints.
8
+
9
+
10
+ ## Getting Started
11
+
12
+ ### Install
13
+
14
+ #### Node
15
+
16
+ ```console
17
+ npm install @huggingface/inference
18
+
19
+ pnpm add @huggingface/inference
20
+
21
+ yarn add @huggingface/inference
22
+ ```
23
+
24
+ #### Deno
25
+
26
+ ```ts
27
+ // esm.sh
28
+ import { InferenceClient } from "https://esm.sh/@huggingface/inference";
29
+ // or npm:
30
+ import { InferenceClient } from "npm:@huggingface/inference";
31
+ ```
32
+
33
+ ### Initialize
34
+
35
+ ```typescript
36
+ import { InferenceClient } from '@huggingface/inference';
37
+
38
+ const hf = new InferenceClient('your access token');
39
+ ```
40
+
41
+ ❗**Important note:** Always pass an access token. Join [Hugging Face](https://huggingface.co/join) and then visit [access tokens](https://huggingface.co/settings/tokens) to generate your access token for **free**.
42
+
43
+ Your access token should be kept private. If you need to protect it in front-end applications, we suggest setting up a proxy server that stores the access token.
44
+
45
+ ## Using Inference Providers
46
+
47
+ You can send inference requests to third-party providers with the inference client.
48
+
49
+ Currently, we support the following providers:
50
+ - [Fal.ai](https://fal.ai)
51
+ - [Featherless AI](https://featherless.ai)
52
+ - [Fireworks AI](https://fireworks.ai)
53
+ - [HF Inference](https://huggingface.co/docs/inference-providers/providers/hf-inference)
54
+ - [Hyperbolic](https://hyperbolic.xyz)
55
+ - [Nebius](https://studio.nebius.ai)
56
+ - [Novita](https://novita.ai)
57
+ - [Nscale](https://nscale.com)
58
+ - [OVHcloud](https://endpoints.ai.cloud.ovh.net/)
59
+ - [Replicate](https://replicate.com)
60
+ - [Sambanova](https://sambanova.ai)
61
+ - [Together](https://together.xyz)
62
+ - [Blackforestlabs](https://blackforestlabs.ai)
63
+ - [Cohere](https://cohere.com)
64
+ - [Cerebras](https://cerebras.ai/)
65
+ - [Groq](https://groq.com)
66
+
67
+ To send requests to a third-party provider, you have to pass the `provider` parameter to the inference function. The default value of the `provider` parameter is "auto", which will select the first of the providers available for the model, sorted by your preferred order in https://hf.co/settings/inference-providers.
68
+
69
+ ```ts
70
+ const accessToken = "hf_..."; // Either a HF access token, or an API key from the third-party provider (Replicate in this example)
71
+
72
+ const client = new InferenceClient(accessToken);
73
+ await client.textToImage({
74
+ provider: "replicate",
75
+ model:"black-forest-labs/Flux.1-dev",
76
+ inputs: "A black forest cake"
77
+ })
78
+ ```
79
+
80
+ You also have to make sure your request is authenticated with an access token.
81
+ When authenticated with a Hugging Face access token, the request is routed through https://huggingface.co.
82
+ When authenticated with a third-party provider key, the request is made directly against that provider's inference API.
83
+
84
+ Only a subset of models are supported when requesting third-party providers. You can check the list of supported models per pipeline tasks here:
85
+ - [Fal.ai supported models](https://huggingface.co/api/partners/fal-ai/models)
86
+ - [Featherless AI supported models](https://huggingface.co/api/partners/featherless-ai/models)
87
+ - [Fireworks AI supported models](https://huggingface.co/api/partners/fireworks-ai/models)
88
+ - [HF Inference supported models](https://huggingface.co/api/partners/hf-inference/models)
89
+ - [Hyperbolic supported models](https://huggingface.co/api/partners/hyperbolic/models)
90
+ - [Nebius supported models](https://huggingface.co/api/partners/nebius/models)
91
+ - [Nscale supported models](https://huggingface.co/api/partners/nscale/models)
92
+ - [OVHcloud supported models](https://huggingface.co/api/partners/ovhcloud/models)
93
+ - [Replicate supported models](https://huggingface.co/api/partners/replicate/models)
94
+ - [Sambanova supported models](https://huggingface.co/api/partners/sambanova/models)
95
+ - [Together supported models](https://huggingface.co/api/partners/together/models)
96
+ - [Cohere supported models](https://huggingface.co/api/partners/cohere/models)
97
+ - [Cerebras supported models](https://huggingface.co/api/partners/cerebras/models)
98
+ - [Groq supported models](https://console.groq.com/docs/models)
99
+ - [Novita AI supported models](https://huggingface.co/api/partners/novita/models)
100
+
101
+ ❗**Important note:** To be compatible, the third-party API must adhere to the "standard" shape API we expect on HF model pages for each pipeline task type.
102
+ This is not an issue for LLMs as everyone converged on the OpenAI API anyways, but can be more tricky for other tasks like "text-to-image" or "automatic-speech-recognition" where there exists no standard API. Let us know if any help is needed or if we can make things easier for you!
103
+
104
+ 👋**Want to add another provider?** Get in touch if you'd like to add support for another Inference provider, and/or request it on https://huggingface.co/spaces/huggingface/HuggingDiscussions/discussions/49
105
+
106
+ ### Tree-shaking
107
+
108
+ You can import the functions you need directly from the module instead of using the `InferenceClient` class.
109
+
110
+ ```ts
111
+ import { textGeneration } from "@huggingface/inference";
112
+
113
+ await textGeneration({
114
+ accessToken: "hf_...",
115
+ model: "model_or_endpoint",
116
+ inputs: ...,
117
+ parameters: ...
118
+ })
119
+ ```
120
+
121
+ This will enable tree-shaking by your bundler.
122
+
123
+ ### Error handling
124
+
125
+ The inference package provides specific error types to help you handle different error scenarios effectively.
126
+
127
+ #### Error Types
128
+
129
+ The package defines several error types that extend the base `Error` class:
130
+
131
+ - `InferenceClientError`: Base error class for all Hugging Face Inference errors
132
+ - `InferenceClientInputError`: Thrown when there are issues with input parameters
133
+ - `InferenceClientProviderApiError`: Thrown when there are API-level errors from providers
134
+ - `InferenceClientHubApiError`: Thrown when there are API-levels errors from the Hugging Face Hub
135
+ - `InferenceClientProviderOutputError`: Thrown when there are issues with providers' API responses format
136
+
137
+ ### Example Usage
138
+
139
+ ```typescript
140
+ import { InferenceClient } from "@huggingface/inference";
141
+ import {
142
+ InferenceClientError,
143
+ InferenceClientProviderApiError,
144
+ InferenceClientProviderOutputError,
145
+ InferenceClientHubApiError,
146
+ } from "@huggingface/inference";
147
+
148
+ const client = new InferenceClient();
149
+
150
+ try {
151
+ const result = await client.textGeneration({
152
+ model: "gpt2",
153
+ inputs: "Hello, I'm a language model",
154
+ });
155
+ } catch (error) {
156
+ if (error instanceof InferenceClientProviderApiError) {
157
+ // Handle API errors (e.g., rate limits, authentication issues)
158
+ console.error("Provider API Error:", error.message);
159
+ console.error("HTTP Request details:", error.request);
160
+ console.error("HTTP Response details:", error.response);
161
+ if (error instanceof InferenceClientHubApiError) {
162
+ // Handle API errors (e.g., rate limits, authentication issues)
163
+ console.error("Hub API Error:", error.message);
164
+ console.error("HTTP Request details:", error.request);
165
+ console.error("HTTP Response details:", error.response);
166
+ } else if (error instanceof InferenceClientProviderOutputError) {
167
+ // Handle malformed responses from providers
168
+ console.error("Provider Output Error:", error.message);
169
+ } else if (error instanceof InferenceClientInputError) {
170
+ // Handle invalid input parameters
171
+ console.error("Input Error:", error.message);
172
+ } else {
173
+ // Handle unexpected errors
174
+ console.error("Unexpected error:", error);
175
+ }
176
+ }
177
+
178
+ /// Catch all errors from @huggingface/inference
179
+ try {
180
+ const result = await client.textGeneration({
181
+ model: "gpt2",
182
+ inputs: "Hello, I'm a language model",
183
+ });
184
+ } catch (error) {
185
+ if (error instanceof InferenceClientError) {
186
+ // Handle errors from @huggingface/inference
187
+ console.error("Error from InferenceClient:", error);
188
+ } else {
189
+ // Handle unexpected errors
190
+ console.error("Unexpected error:", error);
191
+ }
192
+ }
193
+ ```
194
+
195
+ ### Error Details
196
+
197
+ #### InferenceClientProviderApiError
198
+
199
+ This error occurs when there are issues with the API request when performing inference at the selected provider.
200
+
201
+ It has several properties:
202
+ - `message`: A descriptive error message
203
+ - `request`: Details about the failed request (URL, method, headers)
204
+ - `response`: Response details including status code and body
205
+
206
+ #### InferenceClientHubApiError
207
+
208
+ This error occurs when there are issues with the API request when requesting the Hugging Face Hub API.
209
+
210
+ It has several properties:
211
+ - `message`: A descriptive error message
212
+ - `request`: Details about the failed request (URL, method, headers)
213
+ - `response`: Response details including status code and body
214
+
215
+
216
+ #### InferenceClientProviderOutputError
217
+
218
+ This error occurs when a provider returns a response in an unexpected format.
219
+
220
+ #### InferenceClientInputError
221
+
222
+ This error occurs when input parameters are invalid or missing. The error message describes what's wrong with the input.
223
+
224
+
225
+ ### Natural Language Processing
226
+
227
+ #### Text Generation
228
+
229
+ Generates text from an input prompt.
230
+
231
+ ```typescript
232
+ await hf.textGeneration({
233
+ model: 'mistralai/Mixtral-8x7B-v0.1',
234
+ provider: "together",
235
+ inputs: 'The answer to the universe is'
236
+ })
237
+
238
+ for await (const output of hf.textGenerationStream({
239
+ model: "mistralai/Mixtral-8x7B-v0.1",
240
+ provider: "together",
241
+ inputs: 'repeat "one two three four"',
242
+ parameters: { max_new_tokens: 250 }
243
+ })) {
244
+ console.log(output.token.text, output.generated_text);
245
+ }
246
+ ```
247
+
248
+ #### Chat Completion
249
+
250
+ Generate a model response from a list of messages comprising a conversation.
251
+
252
+ ```typescript
253
+ // Non-streaming API
254
+ const out = await hf.chatCompletion({
255
+ model: "Qwen/Qwen3-32B",
256
+ provider: "cerebras",
257
+ messages: [{ role: "user", content: "Hello, nice to meet you!" }],
258
+ max_tokens: 512,
259
+ temperature: 0.1,
260
+ });
261
+
262
+ // Streaming API
263
+ let out = "";
264
+ for await (const chunk of hf.chatCompletionStream({
265
+ model: "Qwen/Qwen3-32B",
266
+ provider: "cerebras",
267
+ messages: [
268
+ { role: "user", content: "Can you help me solve an equation?" },
269
+ ],
270
+ max_tokens: 512,
271
+ temperature: 0.1,
272
+ })) {
273
+ if (chunk.choices && chunk.choices.length > 0) {
274
+ out += chunk.choices[0].delta.content;
275
+ }
276
+ }
277
+ ```
278
+ #### Feature Extraction
279
+
280
+ This task reads some text and outputs raw float values, that are usually consumed as part of a semantic database/semantic search.
281
+
282
+ ```typescript
283
+ await hf.featureExtraction({
284
+ model: "sentence-transformers/distilbert-base-nli-mean-tokens",
285
+ inputs: "That is a happy person",
286
+ });
287
+ ```
288
+
289
+ #### Fill Mask
290
+
291
+ Tries to fill in a hole with a missing word (token to be precise).
292
+
293
+ ```typescript
294
+ await hf.fillMask({
295
+ model: 'bert-base-uncased',
296
+ inputs: '[MASK] world!'
297
+ })
298
+ ```
299
+
300
+ #### Summarization
301
+
302
+ Summarizes longer text into shorter text. Be careful, some models have a maximum length of input.
303
+
304
+ ```typescript
305
+ await hf.summarization({
306
+ model: 'facebook/bart-large-cnn',
307
+ inputs:
308
+ 'The tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building, and the tallest structure in Paris. Its base is square, measuring 125 metres (410 ft) on each side. During its construction, the Eiffel Tower surpassed the Washington Monument to become the tallest man-made structure in the world, a title it held for 41 years until the Chrysler Building in New York City was finished in 1930.',
309
+ parameters: {
310
+ max_length: 100
311
+ }
312
+ })
313
+ ```
314
+
315
+ #### Question Answering
316
+
317
+ Answers questions based on the context you provide.
318
+
319
+ ```typescript
320
+ await hf.questionAnswering({
321
+ model: 'deepset/roberta-base-squad2',
322
+ inputs: {
323
+ question: 'What is the capital of France?',
324
+ context: 'The capital of France is Paris.'
325
+ }
326
+ })
327
+ ```
328
+
329
+ #### Table Question Answering
330
+
331
+ ```typescript
332
+ await hf.tableQuestionAnswering({
333
+ model: 'google/tapas-base-finetuned-wtq',
334
+ inputs: {
335
+ query: 'How many stars does the transformers repository have?',
336
+ table: {
337
+ Repository: ['Transformers', 'Datasets', 'Tokenizers'],
338
+ Stars: ['36542', '4512', '3934'],
339
+ Contributors: ['651', '77', '34'],
340
+ 'Programming language': ['Python', 'Python', 'Rust, Python and NodeJS']
341
+ }
342
+ }
343
+ })
344
+ ```
345
+
346
+ #### Text Classification
347
+
348
+ Often used for sentiment analysis, this method will assign labels to the given text along with a probability score of that label.
349
+
350
+ ```typescript
351
+ await hf.textClassification({
352
+ model: 'distilbert-base-uncased-finetuned-sst-2-english',
353
+ inputs: 'I like you. I love you.'
354
+ })
355
+ ```
356
+
357
+ #### Token Classification
358
+
359
+ Used for sentence parsing, either grammatical, or Named Entity Recognition (NER) to understand keywords contained within text.
360
+
361
+ ```typescript
362
+ await hf.tokenClassification({
363
+ model: 'dbmdz/bert-large-cased-finetuned-conll03-english',
364
+ inputs: 'My name is Sarah Jessica Parker but you can call me Jessica'
365
+ })
366
+ ```
367
+
368
+ #### Translation
369
+
370
+ Converts text from one language to another.
371
+
372
+ ```typescript
373
+ await hf.translation({
374
+ model: 't5-base',
375
+ inputs: 'My name is Wolfgang and I live in Berlin'
376
+ })
377
+
378
+ await hf.translation({
379
+ model: 'facebook/mbart-large-50-many-to-many-mmt',
380
+ inputs: textToTranslate,
381
+ parameters: {
382
+ "src_lang": "en_XX",
383
+ "tgt_lang": "fr_XX"
384
+ }
385
+ })
386
+ ```
387
+
388
+ #### Zero-Shot Classification
389
+
390
+ Checks how well an input text fits into a set of labels you provide.
391
+
392
+ ```typescript
393
+ await hf.zeroShotClassification({
394
+ model: 'facebook/bart-large-mnli',
395
+ inputs: [
396
+ 'Hi, I recently bought a device from your company but it is not working as advertised and I would like to get reimbursed!'
397
+ ],
398
+ parameters: { candidate_labels: ['refund', 'legal', 'faq'] }
399
+ })
400
+ ```
401
+
402
+ #### Sentence Similarity
403
+
404
+ Calculate the semantic similarity between one text and a list of other sentences.
405
+
406
+ ```typescript
407
+ await hf.sentenceSimilarity({
408
+ model: 'sentence-transformers/paraphrase-xlm-r-multilingual-v1',
409
+ inputs: {
410
+ source_sentence: 'That is a happy person',
411
+ sentences: [
412
+ 'That is a happy dog',
413
+ 'That is a very happy person',
414
+ 'Today is a sunny day'
415
+ ]
416
+ }
417
+ })
418
+ ```
419
+
420
+ ### Audio
421
+
422
+ #### Automatic Speech Recognition
423
+
424
+ Transcribes speech from an audio file.
425
+
426
+ [Demo](https://huggingface.co/spaces/huggingfacejs/speech-recognition-vue)
427
+
428
+ ```typescript
429
+ await hf.automaticSpeechRecognition({
430
+ model: 'facebook/wav2vec2-large-960h-lv60-self',
431
+ data: readFileSync('test/sample1.flac')
432
+ })
433
+ ```
434
+
435
+ #### Audio Classification
436
+
437
+ Assigns labels to the given audio along with a probability score of that label.
438
+
439
+ [Demo](https://huggingface.co/spaces/huggingfacejs/audio-classification-vue)
440
+
441
+ ```typescript
442
+ await hf.audioClassification({
443
+ model: 'superb/hubert-large-superb-er',
444
+ data: readFileSync('test/sample1.flac')
445
+ })
446
+ ```
447
+
448
+ #### Text To Speech
449
+
450
+ Generates natural-sounding speech from text input.
451
+
452
+ [Interactive tutorial](https://scrimba.com/scrim/co8da4d23b49b648f77f4848a?pl=pkVnrP7uP)
453
+
454
+ ```typescript
455
+ await hf.textToSpeech({
456
+ model: 'espnet/kan-bayashi_ljspeech_vits',
457
+ inputs: 'Hello world!'
458
+ })
459
+ ```
460
+
461
+ #### Audio To Audio
462
+
463
+ Outputs one or multiple generated audios from an input audio, commonly used for speech enhancement and source separation.
464
+
465
+ ```typescript
466
+ await hf.audioToAudio({
467
+ model: 'speechbrain/sepformer-wham',
468
+ data: readFileSync('test/sample1.flac')
469
+ })
470
+ ```
471
+
472
+ ### Computer Vision
473
+
474
+ #### Image Classification
475
+
476
+ Assigns labels to a given image along with a probability score of that label.
477
+
478
+ [Demo](https://huggingface.co/spaces/huggingfacejs/image-classification-vue)
479
+
480
+ ```typescript
481
+ await hf.imageClassification({
482
+ data: readFileSync('test/cheetah.png'),
483
+ model: 'google/vit-base-patch16-224'
484
+ })
485
+ ```
486
+
487
+ #### Object Detection
488
+
489
+ Detects objects within an image and returns labels with corresponding bounding boxes and probability scores.
490
+
491
+ [Demo](https://huggingface.co/spaces/huggingfacejs/object-detection-vue)
492
+
493
+ ```typescript
494
+ await hf.objectDetection({
495
+ data: readFileSync('test/cats.png'),
496
+ model: 'facebook/detr-resnet-50'
497
+ })
498
+ ```
499
+
500
+ #### Image Segmentation
501
+
502
+ Detects segments within an image and returns labels with corresponding bounding boxes and probability scores.
503
+
504
+ ```typescript
505
+ await hf.imageSegmentation({
506
+ data: readFileSync('test/cats.png'),
507
+ model: 'facebook/detr-resnet-50-panoptic'
508
+ })
509
+ ```
510
+
511
+ #### Image To Text
512
+
513
+ Outputs text from a given image, commonly used for captioning or optical character recognition.
514
+
515
+ ```typescript
516
+ await hf.imageToText({
517
+ data: readFileSync('test/cats.png'),
518
+ model: 'nlpconnect/vit-gpt2-image-captioning'
519
+ })
520
+ ```
521
+
522
+ #### Text To Image
523
+
524
+ Creates an image from a text prompt.
525
+
526
+ [Demo](https://huggingface.co/spaces/huggingfacejs/image-to-text)
527
+
528
+ ```typescript
529
+ await hf.textToImage({
530
+ model: 'black-forest-labs/FLUX.1-dev',
531
+ inputs: 'a picture of a green bird'
532
+ })
533
+ ```
534
+
535
+ #### Image To Image
536
+
537
+ Image-to-image is the task of transforming a source image to match the characteristics of a target image or a target image domain.
538
+
539
+ [Interactive tutorial](https://scrimba.com/scrim/co4834bf9a91cc81cfab07969?pl=pkVnrP7uP)
540
+
541
+ ```typescript
542
+ await hf.imageToImage({
543
+ inputs: new Blob([readFileSync("test/stormtrooper_depth.png")]),
544
+ parameters: {
545
+ prompt: "elmo's lecture",
546
+ },
547
+ model: "lllyasviel/sd-controlnet-depth",
548
+ });
549
+ ```
550
+
551
+ #### Zero Shot Image Classification
552
+
553
+ Checks how well an input image fits into a set of labels you provide.
554
+
555
+ ```typescript
556
+ await hf.zeroShotImageClassification({
557
+ model: 'openai/clip-vit-large-patch14-336',
558
+ inputs: {
559
+ image: await (await fetch('https://placekitten.com/300/300')).blob()
560
+ },
561
+ parameters: {
562
+ candidate_labels: ['cat', 'dog']
563
+ }
564
+ })
565
+ ```
566
+
567
+ ### Multimodal
568
+
569
+
570
+ #### Visual Question Answering
571
+
572
+ Visual Question Answering is the task of answering open-ended questions based on an image. They output natural language responses to natural language questions.
573
+
574
+ [Demo](https://huggingface.co/spaces/huggingfacejs/doc-vis-qa)
575
+
576
+ ```typescript
577
+ await hf.visualQuestionAnswering({
578
+ model: 'dandelin/vilt-b32-finetuned-vqa',
579
+ inputs: {
580
+ question: 'How many cats are lying down?',
581
+ image: await (await fetch('https://placekitten.com/300/300')).blob()
582
+ }
583
+ })
584
+ ```
585
+
586
+ #### Document Question Answering
587
+
588
+ Document question answering models take a (document, question) pair as input and return an answer in natural language.
589
+
590
+ [Demo](https://huggingface.co/spaces/huggingfacejs/doc-vis-qa)
591
+
592
+ ```typescript
593
+ await hf.documentQuestionAnswering({
594
+ model: 'impira/layoutlm-document-qa',
595
+ inputs: {
596
+ question: 'Invoice number?',
597
+ image: await (await fetch('https://huggingface.co/spaces/impira/docquery/resolve/2359223c1837a7587402bda0f2643382a6eefeab/invoice.png')).blob(),
598
+ }
599
+ })
600
+ ```
601
+
602
+ ### Tabular
603
+
604
+ #### Tabular Regression
605
+
606
+ Tabular regression is the task of predicting a numerical value given a set of attributes.
607
+
608
+ ```typescript
609
+ await hf.tabularRegression({
610
+ model: "scikit-learn/Fish-Weight",
611
+ inputs: {
612
+ data: {
613
+ "Height": ["11.52", "12.48", "12.3778"],
614
+ "Length1": ["23.2", "24", "23.9"],
615
+ "Length2": ["25.4", "26.3", "26.5"],
616
+ "Length3": ["30", "31.2", "31.1"],
617
+ "Species": ["Bream", "Bream", "Bream"],
618
+ "Width": ["4.02", "4.3056", "4.6961"]
619
+ },
620
+ },
621
+ })
622
+ ```
623
+
624
+ #### Tabular Classification
625
+
626
+ Tabular classification is the task of classifying a target category (a group) based on set of attributes.
627
+
628
+ ```typescript
629
+ await hf.tabularClassification({
630
+ model: "vvmnnnkv/wine-quality",
631
+ inputs: {
632
+ data: {
633
+ "fixed_acidity": ["7.4", "7.8", "10.3"],
634
+ "volatile_acidity": ["0.7", "0.88", "0.32"],
635
+ "citric_acid": ["0", "0", "0.45"],
636
+ "residual_sugar": ["1.9", "2.6", "6.4"],
637
+ "chlorides": ["0.076", "0.098", "0.073"],
638
+ "free_sulfur_dioxide": ["11", "25", "5"],
639
+ "total_sulfur_dioxide": ["34", "67", "13"],
640
+ "density": ["0.9978", "0.9968", "0.9976"],
641
+ "pH": ["3.51", "3.2", "3.23"],
642
+ "sulphates": ["0.56", "0.68", "0.82"],
643
+ "alcohol": ["9.4", "9.8", "12.6"]
644
+ },
645
+ },
646
+ })
647
+ ```
648
+
649
+ You can use any Chat Completion API-compatible provider with the `chatCompletion` method.
650
+
651
+ ```typescript
652
+ // Chat Completion Example
653
+ const MISTRAL_KEY = process.env.MISTRAL_KEY;
654
+ const hf = new InferenceClient(MISTRAL_KEY, {
655
+ endpointUrl: "https://api.mistral.ai",
656
+ });
657
+ const stream = hf.chatCompletionStream({
658
+ model: "mistral-tiny",
659
+ messages: [{ role: "user", content: "Complete the equation one + one = , just the answer" }],
660
+ });
661
+ let out = "";
662
+ for await (const chunk of stream) {
663
+ if (chunk.choices && chunk.choices.length > 0) {
664
+ out += chunk.choices[0].delta.content;
665
+ console.log(out);
666
+ }
667
+ }
668
+ ```
669
+
670
+ ## Using Inference Endpoints
671
+
672
+ The examples we saw above use inference providers. While these prove to be very useful for prototyping
673
+ and testing things quickly. Once you're ready to deploy your model to production, you'll need to use a dedicated infrastructure. That's where [Inference Endpoints](https://huggingface.co/docs/inference-endpoints/index) comes into play. It allows you to deploy any model and expose it as a private API. Once deployed, you'll get a URL that you can connect to:
674
+
675
+ ```typescript
676
+ import { InferenceClient } from '@huggingface/inference';
677
+
678
+ const hf = new InferenceClient("hf_xxxxxxxxxxxxxx", {
679
+ endpointUrl: "https://j3z5luu0ooo76jnl.us-east-1.aws.endpoints.huggingface.cloud/v1/",
680
+ });
681
+
682
+ const response = await hf.chatCompletion({
683
+ messages: [
684
+ {
685
+ role: "user",
686
+ content: "What is the capital of France?",
687
+ },
688
+ ],
689
+ });
690
+
691
+ console.log(response.choices[0].message.content);
692
+ ```
693
+
694
+ By default, all calls to the inference endpoint will wait until the model is loaded. When [scaling to 0](https://huggingface.co/docs/inference-endpoints/en/autoscaling#scaling-to-0)
695
+ is enabled on the endpoint, this can result in non-trivial waiting time. If you'd rather disable this behavior and handle the endpoint's returned 500 HTTP errors yourself, you can do so like so:
696
+
697
+ ```typescript
698
+ const hf = new InferenceClient("hf_xxxxxxxxxxxxxx", {
699
+ endpointUrl: "https://j3z5luu0ooo76jnl.us-east-1.aws.endpoints.huggingface.cloud/v1/",
700
+ });
701
+
702
+ const response = await hf.chatCompletion(
703
+ {
704
+ messages: [
705
+ {
706
+ role: "user",
707
+ content: "What is the capital of France?",
708
+ },
709
+ ],
710
+ },
711
+ {
712
+ retry_on_error: false,
713
+ }
714
+ );
715
+ ```
716
+ ## Using local endpoints
717
+
718
+ You can use `InferenceClient` to run chat completion with local inference servers (llama.cpp, vllm, litellm server, TGI, mlx, etc.) running on your own machine. The API should be OpenAI API-compatible.
719
+
720
+ ```typescript
721
+ import { InferenceClient } from '@huggingface/inference';
722
+
723
+ const hf = new InferenceClient(undefined, {
724
+ endpointUrl: "http://localhost:8080",
725
+ });
726
+
727
+ const response = await hf.chatCompletion({
728
+ messages: [
729
+ {
730
+ role: "user",
731
+ content: "What is the capital of France?",
732
+ },
733
+ ],
734
+ });
735
+
736
+ console.log(response.choices[0].message.content);
737
+ ```
738
+
739
+ <Tip>
740
+
741
+ Similarily to the OpenAI JS client, `InferenceClient` can be used to run Chat Completion inference with any OpenAI REST API-compatible endpoint.
742
+
743
+ </Tip>
744
+
745
+ ## Running tests
746
+
747
+ ```console
748
+ HF_TOKEN="your access token" pnpm run test
749
+ ```
750
+
751
+ ## Finding appropriate models
752
+
753
+ We have an informative documentation project called [Tasks](https://huggingface.co/tasks) to list available models for each task and explain how each task works in detail.
754
+
755
+ It also contains demos, example outputs, and other resources should you want to dig deeper into the ML side of things.
756
+
757
+ ## Dependencies
758
+
759
+ - `@huggingface/tasks` : Typings only
node_modules/@huggingface/inference/dist/commonjs/InferenceClient.d.ts ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import * as tasks from "./tasks/index.js";
2
+ import type { Options } from "./types.js";
3
+ type Task = typeof tasks;
4
+ export declare class InferenceClient {
5
+ private readonly accessToken;
6
+ private readonly defaultOptions;
7
+ constructor(accessToken?: string, defaultOptions?: Options & {
8
+ endpointUrl?: string;
9
+ });
10
+ /**
11
+ * Returns a new instance of InferenceClient tied to a specified endpoint.
12
+ *
13
+ * For backward compatibility mostly.
14
+ */
15
+ endpoint(endpointUrl: string): InferenceClient;
16
+ }
17
+ export interface InferenceClient extends Task {
18
+ }
19
+ /**
20
+ * For backward compatibility only, will remove soon.
21
+ * @deprecated replace with InferenceClient
22
+ */
23
+ export declare class HfInference extends InferenceClient {
24
+ }
25
+ /**
26
+ * For backward compatibility only, will remove soon.
27
+ * @deprecated replace with InferenceClient
28
+ */
29
+ export declare class InferenceClientEndpoint extends InferenceClient {
30
+ }
31
+ export {};
32
+ //# sourceMappingURL=InferenceClient.d.ts.map
node_modules/@huggingface/inference/dist/commonjs/InferenceClient.d.ts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"InferenceClient.d.ts","sourceRoot":"","sources":["../../src/InferenceClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAO1C,KAAK,IAAI,GAAG,OAAO,KAAK,CAAC;AAEzB,qBAAa,eAAe;IAC3B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAU;gBAGxC,WAAW,SAAK,EAChB,cAAc,GAAE,OAAO,GAAG;QACzB,WAAW,CAAC,EAAE,MAAM,CAAC;KAChB;IAsBP;;;;OAIG;IACI,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,eAAe;CAGrD;AAED,MAAM,WAAW,eAAgB,SAAQ,IAAI;CAAG;AAEhD;;;GAGG;AACH,qBAAa,WAAY,SAAQ,eAAe;CAAG;AACnD;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,eAAe;CAAG"}
node_modules/@huggingface/inference/dist/commonjs/InferenceClient.js ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.InferenceClientEndpoint = exports.HfInference = exports.InferenceClient = void 0;
37
+ const tasks = __importStar(require("./tasks/index.js"));
38
+ const omit_js_1 = require("./utils/omit.js");
39
+ const typedEntries_js_1 = require("./utils/typedEntries.js");
40
+ class InferenceClient {
41
+ accessToken;
42
+ defaultOptions;
43
+ constructor(accessToken = "", defaultOptions = {}) {
44
+ this.accessToken = accessToken;
45
+ this.defaultOptions = defaultOptions;
46
+ for (const [name, fn] of (0, typedEntries_js_1.typedEntries)(tasks)) {
47
+ Object.defineProperty(this, name, {
48
+ enumerable: false,
49
+ value: (params, options) =>
50
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
51
+ fn(
52
+ /// ^ The cast of fn to any is necessary, otherwise TS can't compile because the generated union type is too complex
53
+ { endpointUrl: defaultOptions.endpointUrl, accessToken, ...params }, {
54
+ ...(0, omit_js_1.omit)(defaultOptions, ["endpointUrl"]),
55
+ ...options,
56
+ }),
57
+ });
58
+ }
59
+ }
60
+ /**
61
+ * Returns a new instance of InferenceClient tied to a specified endpoint.
62
+ *
63
+ * For backward compatibility mostly.
64
+ */
65
+ endpoint(endpointUrl) {
66
+ return new InferenceClient(this.accessToken, { ...this.defaultOptions, endpointUrl });
67
+ }
68
+ }
69
+ exports.InferenceClient = InferenceClient;
70
+ /**
71
+ * For backward compatibility only, will remove soon.
72
+ * @deprecated replace with InferenceClient
73
+ */
74
+ class HfInference extends InferenceClient {
75
+ }
76
+ exports.HfInference = HfInference;
77
+ /**
78
+ * For backward compatibility only, will remove soon.
79
+ * @deprecated replace with InferenceClient
80
+ */
81
+ class InferenceClientEndpoint extends InferenceClient {
82
+ }
83
+ exports.InferenceClientEndpoint = InferenceClientEndpoint;
node_modules/@huggingface/inference/dist/commonjs/config.d.ts ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ export declare const HF_HUB_URL = "https://huggingface.co";
2
+ export declare const HF_ROUTER_URL = "https://router.huggingface.co";
3
+ export declare const HF_HEADER_X_BILL_TO = "X-HF-Bill-To";
4
+ //# sourceMappingURL=config.d.ts.map
node_modules/@huggingface/inference/dist/commonjs/config.d.ts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,2BAA2B,CAAC;AACnD,eAAO,MAAM,aAAa,kCAAkC,CAAC;AAC7D,eAAO,MAAM,mBAAmB,iBAAiB,CAAC"}
node_modules/@huggingface/inference/dist/commonjs/config.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HF_HEADER_X_BILL_TO = exports.HF_ROUTER_URL = exports.HF_HUB_URL = void 0;
4
+ exports.HF_HUB_URL = "https://huggingface.co";
5
+ exports.HF_ROUTER_URL = "https://router.huggingface.co";
6
+ exports.HF_HEADER_X_BILL_TO = "X-HF-Bill-To";
node_modules/@huggingface/inference/dist/commonjs/errors.d.ts ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { JsonObject } from "./vendor/type-fest/basic.js";
2
+ /**
3
+ * Base class for all inference-related errors.
4
+ */
5
+ export declare abstract class InferenceClientError extends Error {
6
+ constructor(message: string);
7
+ }
8
+ export declare class InferenceClientInputError extends InferenceClientError {
9
+ constructor(message: string);
10
+ }
11
+ interface HttpRequest {
12
+ url: string;
13
+ method: string;
14
+ headers?: Record<string, string>;
15
+ body?: JsonObject;
16
+ }
17
+ interface HttpResponse {
18
+ requestId: string;
19
+ status: number;
20
+ body: JsonObject | string;
21
+ }
22
+ declare abstract class InferenceClientHttpRequestError extends InferenceClientError {
23
+ httpRequest: HttpRequest;
24
+ httpResponse: HttpResponse;
25
+ constructor(message: string, httpRequest: HttpRequest, httpResponse: HttpResponse);
26
+ }
27
+ /**
28
+ * Thrown when the HTTP request to the provider fails, e.g. due to API issues or server errors.
29
+ */
30
+ export declare class InferenceClientProviderApiError extends InferenceClientHttpRequestError {
31
+ constructor(message: string, httpRequest: HttpRequest, httpResponse: HttpResponse);
32
+ }
33
+ /**
34
+ * Thrown when the HTTP request to the hub fails, e.g. due to API issues or server errors.
35
+ */
36
+ export declare class InferenceClientHubApiError extends InferenceClientHttpRequestError {
37
+ constructor(message: string, httpRequest: HttpRequest, httpResponse: HttpResponse);
38
+ }
39
+ /**
40
+ * Thrown when the inference output returned by the provider is invalid / does not match the expectations
41
+ */
42
+ export declare class InferenceClientProviderOutputError extends InferenceClientError {
43
+ constructor(message: string);
44
+ }
45
+ export {};
46
+ //# sourceMappingURL=errors.d.ts.map
node_modules/@huggingface/inference/dist/commonjs/errors.d.ts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D;;GAEG;AACH,8BAAsB,oBAAqB,SAAQ,KAAK;gBAC3C,OAAO,EAAE,MAAM;CAI3B;AAED,qBAAa,yBAA0B,SAAQ,oBAAoB;gBACtD,OAAO,EAAE,MAAM;CAI3B;AAED,UAAU,WAAW;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,IAAI,CAAC,EAAE,UAAU,CAAC;CAClB;AAED,UAAU,YAAY;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC;CAC1B;AAED,uBAAe,+BAAgC,SAAQ,oBAAoB;IAC1E,WAAW,EAAE,WAAW,CAAC;IACzB,YAAY,EAAE,YAAY,CAAC;gBACf,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY;CAgBjF;AAED;;GAEG;AACH,qBAAa,+BAAgC,SAAQ,+BAA+B;gBACvE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY;CAIjF;AAED;;GAEG;AACH,qBAAa,0BAA2B,SAAQ,+BAA+B;gBAClE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY;CAIjF;AAED;;GAEG;AACH,qBAAa,kCAAmC,SAAQ,oBAAoB;gBAC/D,OAAO,EAAE,MAAM;CAI3B"}
node_modules/@huggingface/inference/dist/commonjs/errors.js ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InferenceClientProviderOutputError = exports.InferenceClientHubApiError = exports.InferenceClientProviderApiError = exports.InferenceClientInputError = exports.InferenceClientError = void 0;
4
+ /**
5
+ * Base class for all inference-related errors.
6
+ */
7
+ class InferenceClientError extends Error {
8
+ constructor(message) {
9
+ super(message);
10
+ this.name = "InferenceClientError";
11
+ }
12
+ }
13
+ exports.InferenceClientError = InferenceClientError;
14
+ class InferenceClientInputError extends InferenceClientError {
15
+ constructor(message) {
16
+ super(message);
17
+ this.name = "InputError";
18
+ }
19
+ }
20
+ exports.InferenceClientInputError = InferenceClientInputError;
21
+ class InferenceClientHttpRequestError extends InferenceClientError {
22
+ httpRequest;
23
+ httpResponse;
24
+ constructor(message, httpRequest, httpResponse) {
25
+ super(message);
26
+ this.httpRequest = {
27
+ ...httpRequest,
28
+ ...(httpRequest.headers
29
+ ? {
30
+ headers: {
31
+ ...httpRequest.headers,
32
+ ...("Authorization" in httpRequest.headers ? { Authorization: `Bearer [redacted]` } : undefined),
33
+ /// redact authentication in the request headers
34
+ },
35
+ }
36
+ : undefined),
37
+ };
38
+ this.httpResponse = httpResponse;
39
+ }
40
+ }
41
+ /**
42
+ * Thrown when the HTTP request to the provider fails, e.g. due to API issues or server errors.
43
+ */
44
+ class InferenceClientProviderApiError extends InferenceClientHttpRequestError {
45
+ constructor(message, httpRequest, httpResponse) {
46
+ super(message, httpRequest, httpResponse);
47
+ this.name = "ProviderApiError";
48
+ }
49
+ }
50
+ exports.InferenceClientProviderApiError = InferenceClientProviderApiError;
51
+ /**
52
+ * Thrown when the HTTP request to the hub fails, e.g. due to API issues or server errors.
53
+ */
54
+ class InferenceClientHubApiError extends InferenceClientHttpRequestError {
55
+ constructor(message, httpRequest, httpResponse) {
56
+ super(message, httpRequest, httpResponse);
57
+ this.name = "HubApiError";
58
+ }
59
+ }
60
+ exports.InferenceClientHubApiError = InferenceClientHubApiError;
61
+ /**
62
+ * Thrown when the inference output returned by the provider is invalid / does not match the expectations
63
+ */
64
+ class InferenceClientProviderOutputError extends InferenceClientError {
65
+ constructor(message) {
66
+ super(message);
67
+ this.name = "ProviderOutputError";
68
+ }
69
+ }
70
+ exports.InferenceClientProviderOutputError = InferenceClientProviderOutputError;
node_modules/@huggingface/inference/dist/commonjs/index.d.ts ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ export { InferenceClient, InferenceClientEndpoint, HfInference } from "./InferenceClient.js";
2
+ export * from "./errors.js";
3
+ export * from "./types.js";
4
+ export * from "./tasks/index.js";
5
+ import * as snippets from "./snippets/index.js";
6
+ export { snippets };
7
+ //# sourceMappingURL=index.d.ts.map
node_modules/@huggingface/inference/dist/commonjs/index.d.ts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC7F,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,CAAC"}
node_modules/@huggingface/inference/dist/commonjs/index.js ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
20
+ };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.snippets = exports.HfInference = exports.InferenceClientEndpoint = exports.InferenceClient = void 0;
40
+ var InferenceClient_js_1 = require("./InferenceClient.js");
41
+ Object.defineProperty(exports, "InferenceClient", { enumerable: true, get: function () { return InferenceClient_js_1.InferenceClient; } });
42
+ Object.defineProperty(exports, "InferenceClientEndpoint", { enumerable: true, get: function () { return InferenceClient_js_1.InferenceClientEndpoint; } });
43
+ Object.defineProperty(exports, "HfInference", { enumerable: true, get: function () { return InferenceClient_js_1.HfInference; } });
44
+ __exportStar(require("./errors.js"), exports);
45
+ __exportStar(require("./types.js"), exports);
46
+ __exportStar(require("./tasks/index.js"), exports);
47
+ const snippets = __importStar(require("./snippets/index.js"));
48
+ exports.snippets = snippets;
node_modules/@huggingface/inference/dist/commonjs/lib/getDefaultTask.d.ts ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export interface DefaultTaskOptions {
2
+ fetch?: typeof fetch;
3
+ }
4
+ /**
5
+ * Get the default task. Use a LRU cache of 1000 items with 10 minutes expiration
6
+ * to avoid making too many calls to the HF hub.
7
+ *
8
+ * @returns The default task for the model, or `null` if it was impossible to get it
9
+ */
10
+ export declare function getDefaultTask(model: string, accessToken: string | undefined, options?: DefaultTaskOptions): Promise<string | null>;
11
+ //# sourceMappingURL=getDefaultTask.d.ts.map
node_modules/@huggingface/inference/dist/commonjs/lib/getDefaultTask.d.ts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"getDefaultTask.d.ts","sourceRoot":"","sources":["../../../src/lib/getDefaultTask.ts"],"names":[],"mappings":"AAYA,MAAM,WAAW,kBAAkB;IAClC,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CACnC,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,OAAO,CAAC,EAAE,kBAAkB,GAC1B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAmCxB"}
node_modules/@huggingface/inference/dist/commonjs/lib/getDefaultTask.js ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getDefaultTask = getDefaultTask;
4
+ const config_js_1 = require("../config.js");
5
+ const isUrl_js_1 = require("./isUrl.js");
6
+ /**
7
+ * We want to make calls to the huggingface hub the least possible, eg if
8
+ * someone is calling Inference Endpoints 1000 times per second, we don't want
9
+ * to make 1000 calls to the hub to get the task name.
10
+ */
11
+ const taskCache = new Map();
12
+ const CACHE_DURATION = 10 * 60 * 1000;
13
+ const MAX_CACHE_ITEMS = 1000;
14
+ /**
15
+ * Get the default task. Use a LRU cache of 1000 items with 10 minutes expiration
16
+ * to avoid making too many calls to the HF hub.
17
+ *
18
+ * @returns The default task for the model, or `null` if it was impossible to get it
19
+ */
20
+ async function getDefaultTask(model, accessToken, options) {
21
+ if ((0, isUrl_js_1.isUrl)(model)) {
22
+ return null;
23
+ }
24
+ const key = `${model}:${accessToken}`;
25
+ let cachedTask = taskCache.get(key);
26
+ if (cachedTask && cachedTask.date < new Date(Date.now() - CACHE_DURATION)) {
27
+ taskCache.delete(key);
28
+ cachedTask = undefined;
29
+ }
30
+ if (cachedTask === undefined) {
31
+ const modelTask = await (options?.fetch ?? fetch)(`${config_js_1.HF_HUB_URL}/api/models/${model}?expand[]=pipeline_tag`, {
32
+ headers: accessToken ? { Authorization: `Bearer ${accessToken}` } : {},
33
+ })
34
+ .then((resp) => resp.json())
35
+ .then((json) => json.pipeline_tag)
36
+ .catch(() => null);
37
+ if (!modelTask) {
38
+ return null;
39
+ }
40
+ cachedTask = { task: modelTask, date: new Date() };
41
+ taskCache.set(key, { task: modelTask, date: new Date() });
42
+ if (taskCache.size > MAX_CACHE_ITEMS) {
43
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
44
+ taskCache.delete(taskCache.keys().next().value);
45
+ }
46
+ }
47
+ return cachedTask.task;
48
+ }
node_modules/@huggingface/inference/dist/commonjs/lib/getInferenceProviderMapping.d.ts ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { WidgetType } from "@huggingface/tasks";
2
+ import type { InferenceProvider, InferenceProviderOrPolicy, ModelId } from "../types.js";
3
+ export declare const inferenceProviderMappingCache: Map<string, Partial<Record<"black-forest-labs" | "cerebras" | "cohere" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "nscale" | "openai" | "ovhcloud" | "replicate" | "sambanova" | "together", Omit<InferenceProviderModelMapping, "hfModelId">>>>;
4
+ export type InferenceProviderMapping = Partial<Record<InferenceProvider, Omit<InferenceProviderModelMapping, "hfModelId">>>;
5
+ export interface InferenceProviderModelMapping {
6
+ adapter?: string;
7
+ adapterWeightsPath?: string;
8
+ hfModelId: ModelId;
9
+ providerId: string;
10
+ status: "live" | "staging";
11
+ task: WidgetType;
12
+ }
13
+ export declare function fetchInferenceProviderMappingForModel(modelId: ModelId, accessToken?: string, options?: {
14
+ fetch?: (input: RequestInfo, init?: RequestInit) => Promise<Response>;
15
+ }): Promise<InferenceProviderMapping>;
16
+ export declare function getInferenceProviderMapping(params: {
17
+ accessToken?: string;
18
+ modelId: ModelId;
19
+ provider: InferenceProvider;
20
+ task: WidgetType;
21
+ }, options: {
22
+ fetch?: (input: RequestInfo, init?: RequestInit) => Promise<Response>;
23
+ }): Promise<InferenceProviderModelMapping | null>;
24
+ export declare function resolveProvider(provider?: InferenceProviderOrPolicy, modelId?: string, endpointUrl?: string): Promise<InferenceProvider>;
25
+ //# sourceMappingURL=getInferenceProviderMapping.d.ts.map
node_modules/@huggingface/inference/dist/commonjs/lib/getInferenceProviderMapping.d.ts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"getInferenceProviderMapping.d.ts","sourceRoot":"","sources":["../../../src/lib/getInferenceProviderMapping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAIrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAIzF,eAAO,MAAM,6BAA6B,uTAA+C,CAAC;AAE1F,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAC7C,MAAM,CAAC,iBAAiB,EAAE,IAAI,CAAC,6BAA6B,EAAE,WAAW,CAAC,CAAC,CAC3E,CAAC;AAEF,MAAM,WAAW,6BAA6B;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,IAAI,EAAE,UAAU,CAAC;CACjB;AAED,wBAAsB,qCAAqC,CAC1D,OAAO,EAAE,OAAO,EAChB,WAAW,CAAC,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE;IACT,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;CACtE,GACC,OAAO,CAAC,wBAAwB,CAAC,CAgDnC;AAED,wBAAsB,2BAA2B,CAChD,MAAM,EAAE;IACP,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,IAAI,EAAE,UAAU,CAAC;CACjB,EACD,OAAO,EAAE;IACR,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;CACtE,GACC,OAAO,CAAC,6BAA6B,GAAG,IAAI,CAAC,CA4B/C;AAED,wBAAsB,eAAe,CACpC,QAAQ,CAAC,EAAE,yBAAyB,EACpC,OAAO,CAAC,EAAE,MAAM,EAChB,WAAW,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,iBAAiB,CAAC,CAyB5B"}
node_modules/@huggingface/inference/dist/commonjs/lib/getInferenceProviderMapping.js ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.inferenceProviderMappingCache = void 0;
4
+ exports.fetchInferenceProviderMappingForModel = fetchInferenceProviderMappingForModel;
5
+ exports.getInferenceProviderMapping = getInferenceProviderMapping;
6
+ exports.resolveProvider = resolveProvider;
7
+ const config_js_1 = require("../config.js");
8
+ const consts_js_1 = require("../providers/consts.js");
9
+ const hf_inference_js_1 = require("../providers/hf-inference.js");
10
+ const typedInclude_js_1 = require("../utils/typedInclude.js");
11
+ const errors_js_1 = require("../errors.js");
12
+ exports.inferenceProviderMappingCache = new Map();
13
+ async function fetchInferenceProviderMappingForModel(modelId, accessToken, options) {
14
+ let inferenceProviderMapping;
15
+ if (exports.inferenceProviderMappingCache.has(modelId)) {
16
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
17
+ inferenceProviderMapping = exports.inferenceProviderMappingCache.get(modelId);
18
+ }
19
+ else {
20
+ const url = `${config_js_1.HF_HUB_URL}/api/models/${modelId}?expand[]=inferenceProviderMapping`;
21
+ const resp = await (options?.fetch ?? fetch)(url, {
22
+ headers: accessToken?.startsWith("hf_") ? { Authorization: `Bearer ${accessToken}` } : {},
23
+ });
24
+ if (!resp.ok) {
25
+ if (resp.headers.get("Content-Type")?.startsWith("application/json")) {
26
+ const error = await resp.json();
27
+ if ("error" in error && typeof error.error === "string") {
28
+ throw new errors_js_1.InferenceClientHubApiError(`Failed to fetch inference provider mapping for model ${modelId}: ${error.error}`, { url, method: "GET" }, { requestId: resp.headers.get("x-request-id") ?? "", status: resp.status, body: error });
29
+ }
30
+ }
31
+ else {
32
+ throw new errors_js_1.InferenceClientHubApiError(`Failed to fetch inference provider mapping for model ${modelId}`, { url, method: "GET" }, { requestId: resp.headers.get("x-request-id") ?? "", status: resp.status, body: await resp.text() });
33
+ }
34
+ }
35
+ let payload = null;
36
+ try {
37
+ payload = await resp.json();
38
+ }
39
+ catch {
40
+ throw new errors_js_1.InferenceClientHubApiError(`Failed to fetch inference provider mapping for model ${modelId}: malformed API response, invalid JSON`, { url, method: "GET" }, { requestId: resp.headers.get("x-request-id") ?? "", status: resp.status, body: await resp.text() });
41
+ }
42
+ if (!payload?.inferenceProviderMapping) {
43
+ throw new errors_js_1.InferenceClientHubApiError(`We have not been able to find inference provider information for model ${modelId}.`, { url, method: "GET" }, { requestId: resp.headers.get("x-request-id") ?? "", status: resp.status, body: await resp.text() });
44
+ }
45
+ inferenceProviderMapping = payload.inferenceProviderMapping;
46
+ }
47
+ return inferenceProviderMapping;
48
+ }
49
+ async function getInferenceProviderMapping(params, options) {
50
+ if (consts_js_1.HARDCODED_MODEL_INFERENCE_MAPPING[params.provider][params.modelId]) {
51
+ return consts_js_1.HARDCODED_MODEL_INFERENCE_MAPPING[params.provider][params.modelId];
52
+ }
53
+ const inferenceProviderMapping = await fetchInferenceProviderMappingForModel(params.modelId, params.accessToken, options);
54
+ const providerMapping = inferenceProviderMapping[params.provider];
55
+ if (providerMapping) {
56
+ const equivalentTasks = params.provider === "hf-inference" && (0, typedInclude_js_1.typedInclude)(hf_inference_js_1.EQUIVALENT_SENTENCE_TRANSFORMERS_TASKS, params.task)
57
+ ? hf_inference_js_1.EQUIVALENT_SENTENCE_TRANSFORMERS_TASKS
58
+ : [params.task];
59
+ if (!(0, typedInclude_js_1.typedInclude)(equivalentTasks, providerMapping.task)) {
60
+ throw new errors_js_1.InferenceClientInputError(`Model ${params.modelId} is not supported for task ${params.task} and provider ${params.provider}. Supported task: ${providerMapping.task}.`);
61
+ }
62
+ if (providerMapping.status === "staging") {
63
+ console.warn(`Model ${params.modelId} is in staging mode for provider ${params.provider}. Meant for test purposes only.`);
64
+ }
65
+ return { ...providerMapping, hfModelId: params.modelId };
66
+ }
67
+ return null;
68
+ }
69
+ async function resolveProvider(provider, modelId, endpointUrl) {
70
+ if (endpointUrl) {
71
+ if (provider) {
72
+ throw new errors_js_1.InferenceClientInputError("Specifying both endpointUrl and provider is not supported.");
73
+ }
74
+ /// Defaulting to hf-inference helpers / API
75
+ return "hf-inference";
76
+ }
77
+ if (!provider) {
78
+ console.log("Defaulting to 'auto' which will select the first provider available for the model, sorted by the user's order in https://hf.co/settings/inference-providers.");
79
+ provider = "auto";
80
+ }
81
+ if (provider === "auto") {
82
+ if (!modelId) {
83
+ throw new errors_js_1.InferenceClientInputError("Specifying a model is required when provider is 'auto'");
84
+ }
85
+ const inferenceProviderMapping = await fetchInferenceProviderMappingForModel(modelId);
86
+ provider = Object.keys(inferenceProviderMapping)[0];
87
+ }
88
+ if (!provider) {
89
+ throw new errors_js_1.InferenceClientInputError(`No Inference Provider available for model ${modelId}.`);
90
+ }
91
+ return provider;
92
+ }
node_modules/@huggingface/inference/dist/commonjs/lib/getProviderHelper.d.ts ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { AudioClassificationTaskHelper, AudioToAudioTaskHelper, AutomaticSpeechRecognitionTaskHelper, ConversationalTaskHelper, DocumentQuestionAnsweringTaskHelper, FeatureExtractionTaskHelper, FillMaskTaskHelper, ImageClassificationTaskHelper, ImageSegmentationTaskHelper, ImageToImageTaskHelper, ImageToTextTaskHelper, ObjectDetectionTaskHelper, QuestionAnsweringTaskHelper, SentenceSimilarityTaskHelper, SummarizationTaskHelper, TableQuestionAnsweringTaskHelper, TabularClassificationTaskHelper, TabularRegressionTaskHelper, TaskProviderHelper, TextClassificationTaskHelper, TextGenerationTaskHelper, TextToAudioTaskHelper, TextToImageTaskHelper, TextToSpeechTaskHelper, TextToVideoTaskHelper, TokenClassificationTaskHelper, TranslationTaskHelper, VisualQuestionAnsweringTaskHelper, ZeroShotClassificationTaskHelper, ZeroShotImageClassificationTaskHelper } from "../providers/providerHelper.js";
2
+ import type { InferenceProvider, InferenceProviderOrPolicy, InferenceTask } from "../types.js";
3
+ export declare const PROVIDERS: Record<InferenceProvider, Partial<Record<InferenceTask, TaskProviderHelper>>>;
4
+ /**
5
+ * Get provider helper instance by name and task
6
+ */
7
+ export declare function getProviderHelper(provider: InferenceProviderOrPolicy, task: "text-to-image"): TextToImageTaskHelper & TaskProviderHelper;
8
+ export declare function getProviderHelper(provider: InferenceProviderOrPolicy, task: "conversational"): ConversationalTaskHelper & TaskProviderHelper;
9
+ export declare function getProviderHelper(provider: InferenceProviderOrPolicy, task: "text-generation"): TextGenerationTaskHelper & TaskProviderHelper;
10
+ export declare function getProviderHelper(provider: InferenceProviderOrPolicy, task: "text-to-speech"): TextToSpeechTaskHelper & TaskProviderHelper;
11
+ export declare function getProviderHelper(provider: InferenceProviderOrPolicy, task: "text-to-audio"): TextToAudioTaskHelper & TaskProviderHelper;
12
+ export declare function getProviderHelper(provider: InferenceProviderOrPolicy, task: "automatic-speech-recognition"): AutomaticSpeechRecognitionTaskHelper & TaskProviderHelper;
13
+ export declare function getProviderHelper(provider: InferenceProviderOrPolicy, task: "text-to-video"): TextToVideoTaskHelper & TaskProviderHelper;
14
+ export declare function getProviderHelper(provider: InferenceProviderOrPolicy, task: "text-classification"): TextClassificationTaskHelper & TaskProviderHelper;
15
+ export declare function getProviderHelper(provider: InferenceProviderOrPolicy, task: "question-answering"): QuestionAnsweringTaskHelper & TaskProviderHelper;
16
+ export declare function getProviderHelper(provider: InferenceProviderOrPolicy, task: "audio-classification"): AudioClassificationTaskHelper & TaskProviderHelper;
17
+ export declare function getProviderHelper(provider: InferenceProviderOrPolicy, task: "audio-to-audio"): AudioToAudioTaskHelper & TaskProviderHelper;
18
+ export declare function getProviderHelper(provider: InferenceProviderOrPolicy, task: "fill-mask"): FillMaskTaskHelper & TaskProviderHelper;
19
+ export declare function getProviderHelper(provider: InferenceProviderOrPolicy, task: "feature-extraction"): FeatureExtractionTaskHelper & TaskProviderHelper;
20
+ export declare function getProviderHelper(provider: InferenceProviderOrPolicy, task: "image-classification"): ImageClassificationTaskHelper & TaskProviderHelper;
21
+ export declare function getProviderHelper(provider: InferenceProviderOrPolicy, task: "image-segmentation"): ImageSegmentationTaskHelper & TaskProviderHelper;
22
+ export declare function getProviderHelper(provider: InferenceProviderOrPolicy, task: "document-question-answering"): DocumentQuestionAnsweringTaskHelper & TaskProviderHelper;
23
+ export declare function getProviderHelper(provider: InferenceProviderOrPolicy, task: "image-to-text"): ImageToTextTaskHelper & TaskProviderHelper;
24
+ export declare function getProviderHelper(provider: InferenceProviderOrPolicy, task: "object-detection"): ObjectDetectionTaskHelper & TaskProviderHelper;
25
+ export declare function getProviderHelper(provider: InferenceProviderOrPolicy, task: "zero-shot-image-classification"): ZeroShotImageClassificationTaskHelper & TaskProviderHelper;
26
+ export declare function getProviderHelper(provider: InferenceProviderOrPolicy, task: "zero-shot-classification"): ZeroShotClassificationTaskHelper & TaskProviderHelper;
27
+ export declare function getProviderHelper(provider: InferenceProviderOrPolicy, task: "image-to-image"): ImageToImageTaskHelper & TaskProviderHelper;
28
+ export declare function getProviderHelper(provider: InferenceProviderOrPolicy, task: "sentence-similarity"): SentenceSimilarityTaskHelper & TaskProviderHelper;
29
+ export declare function getProviderHelper(provider: InferenceProviderOrPolicy, task: "table-question-answering"): TableQuestionAnsweringTaskHelper & TaskProviderHelper;
30
+ export declare function getProviderHelper(provider: InferenceProviderOrPolicy, task: "tabular-classification"): TabularClassificationTaskHelper & TaskProviderHelper;
31
+ export declare function getProviderHelper(provider: InferenceProviderOrPolicy, task: "tabular-regression"): TabularRegressionTaskHelper & TaskProviderHelper;
32
+ export declare function getProviderHelper(provider: InferenceProviderOrPolicy, task: "token-classification"): TokenClassificationTaskHelper & TaskProviderHelper;
33
+ export declare function getProviderHelper(provider: InferenceProviderOrPolicy, task: "translation"): TranslationTaskHelper & TaskProviderHelper;
34
+ export declare function getProviderHelper(provider: InferenceProviderOrPolicy, task: "summarization"): SummarizationTaskHelper & TaskProviderHelper;
35
+ export declare function getProviderHelper(provider: InferenceProviderOrPolicy, task: "visual-question-answering"): VisualQuestionAnsweringTaskHelper & TaskProviderHelper;
36
+ export declare function getProviderHelper(provider: InferenceProviderOrPolicy, task: InferenceTask | undefined): TaskProviderHelper;
37
+ //# sourceMappingURL=getProviderHelper.d.ts.map
node_modules/@huggingface/inference/dist/commonjs/lib/getProviderHelper.d.ts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"getProviderHelper.d.ts","sourceRoot":"","sources":["../../../src/lib/getProviderHelper.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACX,6BAA6B,EAC7B,sBAAsB,EACtB,oCAAoC,EACpC,wBAAwB,EACxB,mCAAmC,EACnC,2BAA2B,EAC3B,kBAAkB,EAClB,6BAA6B,EAC7B,2BAA2B,EAC3B,sBAAsB,EACtB,qBAAqB,EACrB,yBAAyB,EACzB,2BAA2B,EAC3B,4BAA4B,EAC5B,uBAAuB,EACvB,gCAAgC,EAChC,+BAA+B,EAC/B,2BAA2B,EAC3B,kBAAkB,EAClB,4BAA4B,EAC5B,wBAAwB,EACxB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,6BAA6B,EAC7B,qBAAqB,EACrB,iCAAiC,EACjC,gCAAgC,EAChC,qCAAqC,EACrC,MAAM,gCAAgC,CAAC;AAIxC,OAAO,KAAK,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG/F,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,iBAAiB,EAAE,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,kBAAkB,CAAC,CAAC,CAkGnG,CAAC;AAEF;;GAEG;AACH,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,eAAe,GACnB,qBAAqB,GAAG,kBAAkB,CAAC;AAC9C,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,gBAAgB,GACpB,wBAAwB,GAAG,kBAAkB,CAAC;AACjD,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,iBAAiB,GACrB,wBAAwB,GAAG,kBAAkB,CAAC;AACjD,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,gBAAgB,GACpB,sBAAsB,GAAG,kBAAkB,CAAC;AAC/C,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,eAAe,GACnB,qBAAqB,GAAG,kBAAkB,CAAC;AAC9C,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,8BAA8B,GAClC,oCAAoC,GAAG,kBAAkB,CAAC;AAC7D,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,eAAe,GACnB,qBAAqB,GAAG,kBAAkB,CAAC;AAC9C,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,qBAAqB,GACzB,4BAA4B,GAAG,kBAAkB,CAAC;AACrD,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,oBAAoB,GACxB,2BAA2B,GAAG,kBAAkB,CAAC;AACpD,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,sBAAsB,GAC1B,6BAA6B,GAAG,kBAAkB,CAAC;AACtD,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,gBAAgB,GACpB,sBAAsB,GAAG,kBAAkB,CAAC;AAC/C,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,WAAW,GACf,kBAAkB,GAAG,kBAAkB,CAAC;AAC3C,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,oBAAoB,GACxB,2BAA2B,GAAG,kBAAkB,CAAC;AACpD,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,sBAAsB,GAC1B,6BAA6B,GAAG,kBAAkB,CAAC;AACtD,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,oBAAoB,GACxB,2BAA2B,GAAG,kBAAkB,CAAC;AACpD,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,6BAA6B,GACjC,mCAAmC,GAAG,kBAAkB,CAAC;AAC5D,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,eAAe,GACnB,qBAAqB,GAAG,kBAAkB,CAAC;AAC9C,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,kBAAkB,GACtB,yBAAyB,GAAG,kBAAkB,CAAC;AAClD,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,gCAAgC,GACpC,qCAAqC,GAAG,kBAAkB,CAAC;AAC9D,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,0BAA0B,GAC9B,gCAAgC,GAAG,kBAAkB,CAAC;AACzD,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,gBAAgB,GACpB,sBAAsB,GAAG,kBAAkB,CAAC;AAC/C,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,qBAAqB,GACzB,4BAA4B,GAAG,kBAAkB,CAAC;AACrD,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,0BAA0B,GAC9B,gCAAgC,GAAG,kBAAkB,CAAC;AACzD,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,wBAAwB,GAC5B,+BAA+B,GAAG,kBAAkB,CAAC;AACxD,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,oBAAoB,GACxB,2BAA2B,GAAG,kBAAkB,CAAC;AACpD,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,sBAAsB,GAC1B,6BAA6B,GAAG,kBAAkB,CAAC;AACtD,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,aAAa,GACjB,qBAAqB,GAAG,kBAAkB,CAAC;AAC9C,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,eAAe,GACnB,uBAAuB,GAAG,kBAAkB,CAAC;AAChD,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,2BAA2B,GAC/B,iCAAiC,GAAG,kBAAkB,CAAC;AAC1D,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,yBAAyB,EACnC,IAAI,EAAE,aAAa,GAAG,SAAS,GAC7B,kBAAkB,CAAC"}
node_modules/@huggingface/inference/dist/commonjs/lib/getProviderHelper.js ADDED
@@ -0,0 +1,170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.PROVIDERS = void 0;
37
+ exports.getProviderHelper = getProviderHelper;
38
+ const BlackForestLabs = __importStar(require("../providers/black-forest-labs.js"));
39
+ const Cerebras = __importStar(require("../providers/cerebras.js"));
40
+ const Cohere = __importStar(require("../providers/cohere.js"));
41
+ const FalAI = __importStar(require("../providers/fal-ai.js"));
42
+ const FeatherlessAI = __importStar(require("../providers/featherless-ai.js"));
43
+ const Fireworks = __importStar(require("../providers/fireworks-ai.js"));
44
+ const Groq = __importStar(require("../providers/groq.js"));
45
+ const HFInference = __importStar(require("../providers/hf-inference.js"));
46
+ const Hyperbolic = __importStar(require("../providers/hyperbolic.js"));
47
+ const Nebius = __importStar(require("../providers/nebius.js"));
48
+ const Novita = __importStar(require("../providers/novita.js"));
49
+ const Nscale = __importStar(require("../providers/nscale.js"));
50
+ const OpenAI = __importStar(require("../providers/openai.js"));
51
+ const OvhCloud = __importStar(require("../providers/ovhcloud.js"));
52
+ const Replicate = __importStar(require("../providers/replicate.js"));
53
+ const Sambanova = __importStar(require("../providers/sambanova.js"));
54
+ const Together = __importStar(require("../providers/together.js"));
55
+ const errors_js_1 = require("../errors.js");
56
+ exports.PROVIDERS = {
57
+ "black-forest-labs": {
58
+ "text-to-image": new BlackForestLabs.BlackForestLabsTextToImageTask(),
59
+ },
60
+ cerebras: {
61
+ conversational: new Cerebras.CerebrasConversationalTask(),
62
+ },
63
+ cohere: {
64
+ conversational: new Cohere.CohereConversationalTask(),
65
+ },
66
+ "fal-ai": {
67
+ "text-to-image": new FalAI.FalAITextToImageTask(),
68
+ "text-to-speech": new FalAI.FalAITextToSpeechTask(),
69
+ "text-to-video": new FalAI.FalAITextToVideoTask(),
70
+ "automatic-speech-recognition": new FalAI.FalAIAutomaticSpeechRecognitionTask(),
71
+ },
72
+ "featherless-ai": {
73
+ conversational: new FeatherlessAI.FeatherlessAIConversationalTask(),
74
+ "text-generation": new FeatherlessAI.FeatherlessAITextGenerationTask(),
75
+ },
76
+ "hf-inference": {
77
+ "text-to-image": new HFInference.HFInferenceTextToImageTask(),
78
+ conversational: new HFInference.HFInferenceConversationalTask(),
79
+ "text-generation": new HFInference.HFInferenceTextGenerationTask(),
80
+ "text-classification": new HFInference.HFInferenceTextClassificationTask(),
81
+ "question-answering": new HFInference.HFInferenceQuestionAnsweringTask(),
82
+ "audio-classification": new HFInference.HFInferenceAudioClassificationTask(),
83
+ "automatic-speech-recognition": new HFInference.HFInferenceAutomaticSpeechRecognitionTask(),
84
+ "fill-mask": new HFInference.HFInferenceFillMaskTask(),
85
+ "feature-extraction": new HFInference.HFInferenceFeatureExtractionTask(),
86
+ "image-classification": new HFInference.HFInferenceImageClassificationTask(),
87
+ "image-segmentation": new HFInference.HFInferenceImageSegmentationTask(),
88
+ "document-question-answering": new HFInference.HFInferenceDocumentQuestionAnsweringTask(),
89
+ "image-to-text": new HFInference.HFInferenceImageToTextTask(),
90
+ "object-detection": new HFInference.HFInferenceObjectDetectionTask(),
91
+ "audio-to-audio": new HFInference.HFInferenceAudioToAudioTask(),
92
+ "zero-shot-image-classification": new HFInference.HFInferenceZeroShotImageClassificationTask(),
93
+ "zero-shot-classification": new HFInference.HFInferenceZeroShotClassificationTask(),
94
+ "image-to-image": new HFInference.HFInferenceImageToImageTask(),
95
+ "sentence-similarity": new HFInference.HFInferenceSentenceSimilarityTask(),
96
+ "table-question-answering": new HFInference.HFInferenceTableQuestionAnsweringTask(),
97
+ "tabular-classification": new HFInference.HFInferenceTabularClassificationTask(),
98
+ "text-to-speech": new HFInference.HFInferenceTextToSpeechTask(),
99
+ "token-classification": new HFInference.HFInferenceTokenClassificationTask(),
100
+ translation: new HFInference.HFInferenceTranslationTask(),
101
+ summarization: new HFInference.HFInferenceSummarizationTask(),
102
+ "visual-question-answering": new HFInference.HFInferenceVisualQuestionAnsweringTask(),
103
+ "tabular-regression": new HFInference.HFInferenceTabularRegressionTask(),
104
+ "text-to-audio": new HFInference.HFInferenceTextToAudioTask(),
105
+ },
106
+ "fireworks-ai": {
107
+ conversational: new Fireworks.FireworksConversationalTask(),
108
+ },
109
+ groq: {
110
+ conversational: new Groq.GroqConversationalTask(),
111
+ "text-generation": new Groq.GroqTextGenerationTask(),
112
+ },
113
+ hyperbolic: {
114
+ "text-to-image": new Hyperbolic.HyperbolicTextToImageTask(),
115
+ conversational: new Hyperbolic.HyperbolicConversationalTask(),
116
+ "text-generation": new Hyperbolic.HyperbolicTextGenerationTask(),
117
+ },
118
+ nebius: {
119
+ "text-to-image": new Nebius.NebiusTextToImageTask(),
120
+ conversational: new Nebius.NebiusConversationalTask(),
121
+ "text-generation": new Nebius.NebiusTextGenerationTask(),
122
+ "feature-extraction": new Nebius.NebiusFeatureExtractionTask(),
123
+ },
124
+ novita: {
125
+ conversational: new Novita.NovitaConversationalTask(),
126
+ "text-generation": new Novita.NovitaTextGenerationTask(),
127
+ "text-to-video": new Novita.NovitaTextToVideoTask(),
128
+ },
129
+ nscale: {
130
+ "text-to-image": new Nscale.NscaleTextToImageTask(),
131
+ conversational: new Nscale.NscaleConversationalTask(),
132
+ },
133
+ openai: {
134
+ conversational: new OpenAI.OpenAIConversationalTask(),
135
+ },
136
+ ovhcloud: {
137
+ conversational: new OvhCloud.OvhCloudConversationalTask(),
138
+ "text-generation": new OvhCloud.OvhCloudTextGenerationTask(),
139
+ },
140
+ replicate: {
141
+ "text-to-image": new Replicate.ReplicateTextToImageTask(),
142
+ "text-to-speech": new Replicate.ReplicateTextToSpeechTask(),
143
+ "text-to-video": new Replicate.ReplicateTextToVideoTask(),
144
+ },
145
+ sambanova: {
146
+ conversational: new Sambanova.SambanovaConversationalTask(),
147
+ "feature-extraction": new Sambanova.SambanovaFeatureExtractionTask(),
148
+ },
149
+ together: {
150
+ "text-to-image": new Together.TogetherTextToImageTask(),
151
+ conversational: new Together.TogetherConversationalTask(),
152
+ "text-generation": new Together.TogetherTextGenerationTask(),
153
+ },
154
+ };
155
+ function getProviderHelper(provider, task) {
156
+ if ((provider === "hf-inference" && !task) || provider === "auto") {
157
+ return new HFInference.HFInferenceTask();
158
+ }
159
+ if (!task) {
160
+ throw new errors_js_1.InferenceClientInputError("you need to provide a task name when using an external provider, e.g. 'text-to-image'");
161
+ }
162
+ if (!(provider in exports.PROVIDERS)) {
163
+ throw new errors_js_1.InferenceClientInputError(`Provider '${provider}' not supported. Available providers: ${Object.keys(exports.PROVIDERS)}`);
164
+ }
165
+ const providerTasks = exports.PROVIDERS[provider];
166
+ if (!providerTasks || !(task in providerTasks)) {
167
+ throw new errors_js_1.InferenceClientInputError(`Task '${task}' not supported for provider '${provider}'. Available tasks: ${Object.keys(providerTasks ?? {})}`);
168
+ }
169
+ return providerTasks[task];
170
+ }
node_modules/@huggingface/inference/dist/commonjs/lib/isUrl.d.ts ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ export declare function isUrl(modelOrUrl: string): boolean;
2
+ //# sourceMappingURL=isUrl.d.ts.map
node_modules/@huggingface/inference/dist/commonjs/lib/isUrl.d.ts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"isUrl.d.ts","sourceRoot":"","sources":["../../../src/lib/isUrl.ts"],"names":[],"mappings":"AAAA,wBAAgB,KAAK,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAEjD"}
node_modules/@huggingface/inference/dist/commonjs/lib/isUrl.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isUrl = isUrl;
4
+ function isUrl(modelOrUrl) {
5
+ return /^http(s?):/.test(modelOrUrl) || modelOrUrl.startsWith("/");
6
+ }
node_modules/@huggingface/inference/dist/commonjs/lib/makeRequestOptions.d.ts ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { InferenceTask, Options, RequestArgs } from "../types.js";
2
+ import type { InferenceProviderModelMapping } from "./getInferenceProviderMapping.js";
3
+ import type { getProviderHelper } from "./getProviderHelper.js";
4
+ /**
5
+ * Helper that prepares request arguments.
6
+ * This async version handle the model ID resolution step.
7
+ */
8
+ export declare function makeRequestOptions(args: RequestArgs & {
9
+ data?: Blob | ArrayBuffer;
10
+ stream?: boolean;
11
+ }, providerHelper: ReturnType<typeof getProviderHelper>, options?: Options & {
12
+ /** In most cases (unless we pass a endpointUrl) we know the task */
13
+ task?: InferenceTask;
14
+ }): Promise<{
15
+ url: string;
16
+ info: RequestInit;
17
+ }>;
18
+ /**
19
+ * Helper that prepares request arguments. - for internal use only
20
+ * This sync version skips the model ID resolution step
21
+ */
22
+ export declare function makeRequestOptionsFromResolvedModel(resolvedModel: string, providerHelper: ReturnType<typeof getProviderHelper>, args: RequestArgs & {
23
+ data?: Blob | ArrayBuffer;
24
+ stream?: boolean;
25
+ }, mapping: InferenceProviderModelMapping | undefined, options?: Options & {
26
+ task?: InferenceTask;
27
+ }): {
28
+ url: string;
29
+ info: RequestInit;
30
+ };
31
+ //# sourceMappingURL=makeRequestOptions.d.ts.map
node_modules/@huggingface/inference/dist/commonjs/lib/makeRequestOptions.d.ts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"makeRequestOptions.d.ts","sourceRoot":"","sources":["../../../src/lib/makeRequestOptions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AAEtF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAUhE;;;GAGG;AACH,wBAAsB,kBAAkB,CACvC,IAAI,EAAE,WAAW,GAAG;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,WAAW,CAAC;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB,EACD,cAAc,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,EACpD,OAAO,CAAC,EAAE,OAAO,GAAG;IACnB,oEAAoE;IACpE,IAAI,CAAC,EAAE,aAAa,CAAC;CACrB,GACC,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,WAAW,CAAA;CAAE,CAAC,CAqE7C;AAED;;;GAGG;AACH,wBAAgB,mCAAmC,CAClD,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,EACpD,IAAI,EAAE,WAAW,GAAG;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,WAAW,CAAC;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB,EACD,OAAO,EAAE,6BAA6B,GAAG,SAAS,EAClD,OAAO,CAAC,EAAE,OAAO,GAAG;IACnB,IAAI,CAAC,EAAE,aAAa,CAAC;CACrB,GACC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,WAAW,CAAA;CAAE,CA8EpC"}
node_modules/@huggingface/inference/dist/commonjs/lib/makeRequestOptions.js ADDED
@@ -0,0 +1,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeRequestOptions = makeRequestOptions;
4
+ exports.makeRequestOptionsFromResolvedModel = makeRequestOptionsFromResolvedModel;
5
+ const config_js_1 = require("../config.js");
6
+ const package_js_1 = require("../package.js");
7
+ const getInferenceProviderMapping_js_1 = require("./getInferenceProviderMapping.js");
8
+ const isUrl_js_1 = require("./isUrl.js");
9
+ const errors_js_1 = require("../errors.js");
10
+ /**
11
+ * Lazy-loaded from huggingface.co/api/tasks when needed
12
+ * Used to determine the default model to use when it's not user defined
13
+ */
14
+ let tasks = null;
15
+ /**
16
+ * Helper that prepares request arguments.
17
+ * This async version handle the model ID resolution step.
18
+ */
19
+ async function makeRequestOptions(args, providerHelper, options) {
20
+ const { model: maybeModel } = args;
21
+ const provider = providerHelper.provider;
22
+ const { task } = options ?? {};
23
+ // Validate inputs
24
+ if (args.endpointUrl && provider !== "hf-inference") {
25
+ throw new errors_js_1.InferenceClientInputError(`Cannot use endpointUrl with a third-party provider.`);
26
+ }
27
+ if (maybeModel && (0, isUrl_js_1.isUrl)(maybeModel)) {
28
+ throw new errors_js_1.InferenceClientInputError(`Model URLs are no longer supported. Use endpointUrl instead.`);
29
+ }
30
+ if (args.endpointUrl) {
31
+ // No need to have maybeModel, or to load default model for a task
32
+ return makeRequestOptionsFromResolvedModel(maybeModel ?? args.endpointUrl, providerHelper, args, undefined, options);
33
+ }
34
+ if (!maybeModel && !task) {
35
+ throw new errors_js_1.InferenceClientInputError("No model provided, and no task has been specified.");
36
+ }
37
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
38
+ const hfModel = maybeModel ?? (await loadDefaultModel(task));
39
+ if (providerHelper.clientSideRoutingOnly && !maybeModel) {
40
+ throw new errors_js_1.InferenceClientInputError(`Provider ${provider} requires a model ID to be passed directly.`);
41
+ }
42
+ const inferenceProviderMapping = providerHelper.clientSideRoutingOnly
43
+ ? {
44
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
45
+ providerId: removeProviderPrefix(maybeModel, provider),
46
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
47
+ hfModelId: maybeModel,
48
+ status: "live",
49
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
50
+ task: task,
51
+ }
52
+ : await (0, getInferenceProviderMapping_js_1.getInferenceProviderMapping)({
53
+ modelId: hfModel,
54
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
55
+ task: task,
56
+ provider,
57
+ accessToken: args.accessToken,
58
+ }, { fetch: options?.fetch });
59
+ if (!inferenceProviderMapping) {
60
+ throw new errors_js_1.InferenceClientInputError(`We have not been able to find inference provider information for model ${hfModel}.`);
61
+ }
62
+ // Use the sync version with the resolved model
63
+ return makeRequestOptionsFromResolvedModel(inferenceProviderMapping.providerId, providerHelper, args, inferenceProviderMapping, options);
64
+ }
65
+ /**
66
+ * Helper that prepares request arguments. - for internal use only
67
+ * This sync version skips the model ID resolution step
68
+ */
69
+ function makeRequestOptionsFromResolvedModel(resolvedModel, providerHelper, args, mapping, options) {
70
+ const { accessToken, endpointUrl, provider: maybeProvider, model, ...remainingArgs } = args;
71
+ void model;
72
+ void maybeProvider;
73
+ const provider = providerHelper.provider;
74
+ const { includeCredentials, task, signal, billTo } = options ?? {};
75
+ const authMethod = (() => {
76
+ if (providerHelper.clientSideRoutingOnly) {
77
+ // Closed-source providers require an accessToken (cannot be routed).
78
+ if (accessToken && accessToken.startsWith("hf_")) {
79
+ throw new errors_js_1.InferenceClientInputError(`Provider ${provider} is closed-source and does not support HF tokens.`);
80
+ }
81
+ }
82
+ if (accessToken) {
83
+ return accessToken.startsWith("hf_") ? "hf-token" : "provider-key";
84
+ }
85
+ if (includeCredentials === "include") {
86
+ // If accessToken is passed, it should take precedence over includeCredentials
87
+ return "credentials-include";
88
+ }
89
+ return "none";
90
+ })();
91
+ // Make URL
92
+ const modelId = endpointUrl ?? resolvedModel;
93
+ const url = providerHelper.makeUrl({
94
+ authMethod,
95
+ model: modelId,
96
+ task,
97
+ });
98
+ // Make headers
99
+ const headers = providerHelper.prepareHeaders({
100
+ accessToken,
101
+ authMethod,
102
+ }, "data" in args && !!args.data);
103
+ if (billTo) {
104
+ headers[config_js_1.HF_HEADER_X_BILL_TO] = billTo;
105
+ }
106
+ // Add user-agent to headers
107
+ // e.g. @huggingface/inference/3.1.3
108
+ const ownUserAgent = `${package_js_1.PACKAGE_NAME}/${package_js_1.PACKAGE_VERSION}`;
109
+ const userAgent = [ownUserAgent, typeof navigator !== "undefined" ? navigator.userAgent : undefined]
110
+ .filter((x) => x !== undefined)
111
+ .join(" ");
112
+ headers["User-Agent"] = userAgent;
113
+ // Make body
114
+ const body = providerHelper.makeBody({
115
+ args: remainingArgs,
116
+ model: resolvedModel,
117
+ task,
118
+ mapping,
119
+ });
120
+ /**
121
+ * For edge runtimes, leave 'credentials' undefined, otherwise cloudflare workers will error
122
+ */
123
+ let credentials;
124
+ if (typeof includeCredentials === "string") {
125
+ credentials = includeCredentials;
126
+ }
127
+ else if (includeCredentials === true) {
128
+ credentials = "include";
129
+ }
130
+ const info = {
131
+ headers,
132
+ method: "POST",
133
+ body: body,
134
+ ...(credentials ? { credentials } : undefined),
135
+ signal,
136
+ };
137
+ return { url, info };
138
+ }
139
+ async function loadDefaultModel(task) {
140
+ if (!tasks) {
141
+ tasks = await loadTaskInfo();
142
+ }
143
+ const taskInfo = tasks[task];
144
+ if ((taskInfo?.models.length ?? 0) <= 0) {
145
+ throw new errors_js_1.InferenceClientInputError(`No default model defined for task ${task}, please define the model explicitly.`);
146
+ }
147
+ return taskInfo.models[0].id;
148
+ }
149
+ async function loadTaskInfo() {
150
+ const url = `${config_js_1.HF_HUB_URL}/api/tasks`;
151
+ const res = await fetch(url);
152
+ if (!res.ok) {
153
+ throw new errors_js_1.InferenceClientHubApiError("Failed to load tasks definitions from Hugging Face Hub.", { url, method: "GET" }, { requestId: res.headers.get("x-request-id") ?? "", status: res.status, body: await res.text() });
154
+ }
155
+ return await res.json();
156
+ }
157
+ function removeProviderPrefix(model, provider) {
158
+ if (!model.startsWith(`${provider}/`)) {
159
+ throw new errors_js_1.InferenceClientInputError(`Models from ${provider} must be prefixed by "${provider}/". Got "${model}".`);
160
+ }
161
+ return model.slice(provider.length + 1);
162
+ }
node_modules/@huggingface/inference/dist/commonjs/package.d.ts ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ export declare const PACKAGE_VERSION = "4.0.4";
2
+ export declare const PACKAGE_NAME = "@huggingface/inference";
3
+ //# sourceMappingURL=package.d.ts.map
node_modules/@huggingface/inference/dist/commonjs/package.d.ts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../src/package.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,eAAe,UAAU,CAAC;AACvC,eAAO,MAAM,YAAY,2BAA2B,CAAC"}
node_modules/@huggingface/inference/dist/commonjs/package.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PACKAGE_NAME = exports.PACKAGE_VERSION = void 0;
4
+ // Generated file from package.json. Issues importing JSON directly when publishing on commonjs/ESM - see https://github.com/microsoft/TypeScript/issues/51783
5
+ exports.PACKAGE_VERSION = "4.0.4";
6
+ exports.PACKAGE_NAME = "@huggingface/inference";
node_modules/@huggingface/inference/dist/commonjs/package.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "type": "commonjs"
3
+ }
node_modules/@huggingface/inference/dist/commonjs/providers/black-forest-labs.d.ts ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { BodyParams, HeaderParams, UrlParams } from "../types.js";
2
+ import { TaskProviderHelper, type TextToImageTaskHelper } from "./providerHelper.js";
3
+ interface BlackForestLabsResponse {
4
+ id: string;
5
+ polling_url: string;
6
+ }
7
+ export declare class BlackForestLabsTextToImageTask extends TaskProviderHelper implements TextToImageTaskHelper {
8
+ constructor();
9
+ preparePayload(params: BodyParams): Record<string, unknown>;
10
+ prepareHeaders(params: HeaderParams, binary: boolean): Record<string, string>;
11
+ makeRoute(params: UrlParams): string;
12
+ getResponse(response: BlackForestLabsResponse, url?: string, headers?: HeadersInit, outputType?: "url" | "blob"): Promise<string | Blob>;
13
+ }
14
+ export {};
15
+ //# sourceMappingURL=black-forest-labs.d.ts.map
node_modules/@huggingface/inference/dist/commonjs/providers/black-forest-labs.d.ts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"black-forest-labs.d.ts","sourceRoot":"","sources":["../../../src/providers/black-forest-labs.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGvE,OAAO,EAAE,kBAAkB,EAAE,KAAK,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAGrF,UAAU,uBAAuB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,8BAA+B,SAAQ,kBAAmB,YAAW,qBAAqB;;IAKtG,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAQlD,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAWtF,SAAS,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM;IAO9B,WAAW,CAChB,QAAQ,EAAE,uBAAuB,EACjC,GAAG,CAAC,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,WAAW,EACrB,UAAU,CAAC,EAAE,KAAK,GAAG,MAAM,GACzB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;CAsCzB"}
node_modules/@huggingface/inference/dist/commonjs/providers/black-forest-labs.js ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BlackForestLabsTextToImageTask = void 0;
4
+ /**
5
+ * See the registered mapping of HF model ID => Black Forest Labs model ID here:
6
+ *
7
+ * https://huggingface.co/api/partners/blackforestlabs/models
8
+ *
9
+ * This is a publicly available mapping.
10
+ *
11
+ * If you want to try to run inference for a new model locally before it's registered on huggingface.co,
12
+ * you can add it to the dictionary "HARDCODED_MODEL_ID_MAPPING" in consts.ts, for dev purposes.
13
+ *
14
+ * - If you work at Black Forest Labs and want to update this mapping, please use the model mapping API we provide on huggingface.co
15
+ * - If you're a community member and want to add a new supported HF model to Black Forest Labs, please open an issue on the present repo
16
+ * and we will tag Black Forest Labs team members.
17
+ *
18
+ * Thanks!
19
+ */
20
+ const errors_js_1 = require("../errors.js");
21
+ const delay_js_1 = require("../utils/delay.js");
22
+ const omit_js_1 = require("../utils/omit.js");
23
+ const providerHelper_js_1 = require("./providerHelper.js");
24
+ const BLACK_FOREST_LABS_AI_API_BASE_URL = "https://api.us1.bfl.ai";
25
+ class BlackForestLabsTextToImageTask extends providerHelper_js_1.TaskProviderHelper {
26
+ constructor() {
27
+ super("black-forest-labs", BLACK_FOREST_LABS_AI_API_BASE_URL);
28
+ }
29
+ preparePayload(params) {
30
+ return {
31
+ ...(0, omit_js_1.omit)(params.args, ["inputs", "parameters"]),
32
+ ...params.args.parameters,
33
+ prompt: params.args.inputs,
34
+ };
35
+ }
36
+ prepareHeaders(params, binary) {
37
+ const headers = {
38
+ Authorization: params.authMethod !== "provider-key" ? `Bearer ${params.accessToken}` : `X-Key ${params.accessToken}`,
39
+ };
40
+ if (!binary) {
41
+ headers["Content-Type"] = "application/json";
42
+ }
43
+ return headers;
44
+ }
45
+ makeRoute(params) {
46
+ if (!params) {
47
+ throw new errors_js_1.InferenceClientInputError("Params are required");
48
+ }
49
+ return `/v1/${params.model}`;
50
+ }
51
+ async getResponse(response, url, headers, outputType) {
52
+ const urlObj = new URL(response.polling_url);
53
+ for (let step = 0; step < 5; step++) {
54
+ await (0, delay_js_1.delay)(1000);
55
+ console.debug(`Polling Black Forest Labs API for the result... ${step + 1}/5`);
56
+ urlObj.searchParams.set("attempt", step.toString(10));
57
+ const resp = await fetch(urlObj, { headers: { "Content-Type": "application/json" } });
58
+ if (!resp.ok) {
59
+ throw new errors_js_1.InferenceClientProviderApiError("Failed to fetch result from black forest labs API", { url: urlObj.toString(), method: "GET", headers: { "Content-Type": "application/json" } }, { requestId: resp.headers.get("x-request-id") ?? "", status: resp.status, body: await resp.text() });
60
+ }
61
+ const payload = await resp.json();
62
+ if (typeof payload === "object" &&
63
+ payload &&
64
+ "status" in payload &&
65
+ typeof payload.status === "string" &&
66
+ payload.status === "Ready" &&
67
+ "result" in payload &&
68
+ typeof payload.result === "object" &&
69
+ payload.result &&
70
+ "sample" in payload.result &&
71
+ typeof payload.result.sample === "string") {
72
+ if (outputType === "url") {
73
+ return payload.result.sample;
74
+ }
75
+ const image = await fetch(payload.result.sample);
76
+ return await image.blob();
77
+ }
78
+ }
79
+ throw new errors_js_1.InferenceClientProviderOutputError(`Timed out while waiting for the result from black forest labs API - aborting after 5 attempts`);
80
+ }
81
+ }
82
+ exports.BlackForestLabsTextToImageTask = BlackForestLabsTextToImageTask;
node_modules/@huggingface/inference/dist/commonjs/providers/cerebras.d.ts ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * See the registered mapping of HF model ID => Cerebras model ID here:
3
+ *
4
+ * https://huggingface.co/api/partners/cerebras/models
5
+ *
6
+ * This is a publicly available mapping.
7
+ *
8
+ * If you want to try to run inference for a new model locally before it's registered on huggingface.co,
9
+ * you can add it to the dictionary "HARDCODED_MODEL_ID_MAPPING" in consts.ts, for dev purposes.
10
+ *
11
+ * - If you work at Cerebras and want to update this mapping, please use the model mapping API we provide on huggingface.co
12
+ * - If you're a community member and want to add a new supported HF model to Cerebras, please open an issue on the present repo
13
+ * and we will tag Cerebras team members.
14
+ *
15
+ * Thanks!
16
+ */
17
+ import { BaseConversationalTask } from "./providerHelper.js";
18
+ export declare class CerebrasConversationalTask extends BaseConversationalTask {
19
+ constructor();
20
+ }
21
+ //# sourceMappingURL=cerebras.d.ts.map
node_modules/@huggingface/inference/dist/commonjs/providers/cerebras.d.ts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"cerebras.d.ts","sourceRoot":"","sources":["../../../src/providers/cerebras.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,qBAAa,0BAA2B,SAAQ,sBAAsB;;CAIrE"}
node_modules/@huggingface/inference/dist/commonjs/providers/cerebras.js ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ /**
3
+ * See the registered mapping of HF model ID => Cerebras model ID here:
4
+ *
5
+ * https://huggingface.co/api/partners/cerebras/models
6
+ *
7
+ * This is a publicly available mapping.
8
+ *
9
+ * If you want to try to run inference for a new model locally before it's registered on huggingface.co,
10
+ * you can add it to the dictionary "HARDCODED_MODEL_ID_MAPPING" in consts.ts, for dev purposes.
11
+ *
12
+ * - If you work at Cerebras and want to update this mapping, please use the model mapping API we provide on huggingface.co
13
+ * - If you're a community member and want to add a new supported HF model to Cerebras, please open an issue on the present repo
14
+ * and we will tag Cerebras team members.
15
+ *
16
+ * Thanks!
17
+ */
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.CerebrasConversationalTask = void 0;
20
+ const providerHelper_js_1 = require("./providerHelper.js");
21
+ class CerebrasConversationalTask extends providerHelper_js_1.BaseConversationalTask {
22
+ constructor() {
23
+ super("cerebras", "https://api.cerebras.ai");
24
+ }
25
+ }
26
+ exports.CerebrasConversationalTask = CerebrasConversationalTask;
node_modules/@huggingface/inference/dist/commonjs/providers/cohere.d.ts ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * See the registered mapping of HF model ID => Cohere model ID here:
3
+ *
4
+ * https://huggingface.co/api/partners/cohere/models
5
+ *
6
+ * This is a publicly available mapping.
7
+ *
8
+ * If you want to try to run inference for a new model locally before it's registered on huggingface.co,
9
+ * you can add it to the dictionary "HARDCODED_MODEL_ID_MAPPING" in consts.ts, for dev purposes.
10
+ *
11
+ * - If you work at Cohere and want to update this mapping, please use the model mapping API we provide on huggingface.co
12
+ * - If you're a community member and want to add a new supported HF model to Cohere, please open an issue on the present repo
13
+ * and we will tag Cohere team members.
14
+ *
15
+ * Thanks!
16
+ */
17
+ import { BaseConversationalTask } from "./providerHelper.js";
18
+ export declare class CohereConversationalTask extends BaseConversationalTask {
19
+ constructor();
20
+ makeRoute(): string;
21
+ }
22
+ //# sourceMappingURL=cohere.d.ts.map
node_modules/@huggingface/inference/dist/commonjs/providers/cohere.d.ts.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"cohere.d.ts","sourceRoot":"","sources":["../../../src/providers/cohere.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,qBAAa,wBAAyB,SAAQ,sBAAsB;;IAI1D,SAAS,IAAI,MAAM;CAG5B"}
node_modules/@huggingface/inference/dist/commonjs/providers/cohere.js ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CohereConversationalTask = void 0;
4
+ /**
5
+ * See the registered mapping of HF model ID => Cohere model ID here:
6
+ *
7
+ * https://huggingface.co/api/partners/cohere/models
8
+ *
9
+ * This is a publicly available mapping.
10
+ *
11
+ * If you want to try to run inference for a new model locally before it's registered on huggingface.co,
12
+ * you can add it to the dictionary "HARDCODED_MODEL_ID_MAPPING" in consts.ts, for dev purposes.
13
+ *
14
+ * - If you work at Cohere and want to update this mapping, please use the model mapping API we provide on huggingface.co
15
+ * - If you're a community member and want to add a new supported HF model to Cohere, please open an issue on the present repo
16
+ * and we will tag Cohere team members.
17
+ *
18
+ * Thanks!
19
+ */
20
+ const providerHelper_js_1 = require("./providerHelper.js");
21
+ class CohereConversationalTask extends providerHelper_js_1.BaseConversationalTask {
22
+ constructor() {
23
+ super("cohere", "https://api.cohere.com");
24
+ }
25
+ makeRoute() {
26
+ return "/compatibility/v1/chat/completions";
27
+ }
28
+ }
29
+ exports.CohereConversationalTask = CohereConversationalTask;
node_modules/@huggingface/inference/dist/commonjs/providers/consts.d.ts ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { InferenceProviderModelMapping } from "../lib/getInferenceProviderMapping.js";
2
+ import type { InferenceProvider } from "../types.js";
3
+ import { type ModelId } from "../types.js";
4
+ /**
5
+ * If you want to try to run inference for a new model locally before it's registered on huggingface.co
6
+ * for a given Inference Provider,
7
+ * you can add it to the following dictionary, for dev purposes.
8
+ *
9
+ * We also inject into this dictionary from tests.
10
+ */
11
+ export declare const HARDCODED_MODEL_INFERENCE_MAPPING: Record<InferenceProvider, Record<ModelId, InferenceProviderModelMapping>>;
12
+ //# sourceMappingURL=consts.d.ts.map