omnius 1.0.586 → 1.0.587
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -2
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -753415,6 +753415,7 @@ var init_embedding_workers = __esm({
|
|
|
753415
753415
|
var serve_exports = {};
|
|
753416
753416
|
__export(serve_exports, {
|
|
753417
753417
|
apiServeCommand: () => apiServeCommand,
|
|
753418
|
+
checkEndpointRateLimit: () => checkEndpointRateLimit,
|
|
753418
753419
|
readServerPackageIdentity: () => readServerPackageIdentity,
|
|
753419
753420
|
startApiServer: () => startApiServer
|
|
753420
753421
|
});
|
|
@@ -753530,8 +753531,10 @@ function getEndpointUsage(label) {
|
|
|
753530
753531
|
return u;
|
|
753531
753532
|
}
|
|
753532
753533
|
function checkEndpointRateLimit(ep, estimatedTokens) {
|
|
753533
|
-
const
|
|
753534
|
-
|
|
753534
|
+
const limits = ep.limits;
|
|
753535
|
+
if (!limits) return null;
|
|
753536
|
+
const rpm = limits.maxRequestsPerMinute;
|
|
753537
|
+
const tpd = limits.maxTokensPerDay;
|
|
753535
753538
|
const usage = getEndpointUsage(ep.label);
|
|
753536
753539
|
const now2 = Date.now();
|
|
753537
753540
|
usage.requestTimestamps = usage.requestTimestamps.filter(
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.587",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omnius",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.587",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"image-to-ascii"
|
|
12
12
|
],
|
package/package.json
CHANGED