@elizaos/core 1.5.15 → 1.6.0-alpha.4
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/node/index.node.js
CHANGED
|
@@ -25755,7 +25755,7 @@ var getDefaultProjectName = () => {
|
|
|
25755
25755
|
};
|
|
25756
25756
|
|
|
25757
25757
|
// ../../node_modules/langsmith/dist/index.js
|
|
25758
|
-
var __version__ = "0.3.
|
|
25758
|
+
var __version__ = "0.3.71";
|
|
25759
25759
|
|
|
25760
25760
|
// ../../node_modules/langsmith/dist/utils/env.js
|
|
25761
25761
|
var globalEnv;
|
|
@@ -26816,13 +26816,13 @@ class AutoBatchQueue {
|
|
|
26816
26816
|
this.sizeBytes += size;
|
|
26817
26817
|
return itemPromise;
|
|
26818
26818
|
}
|
|
26819
|
-
pop(upToSizeBytes) {
|
|
26819
|
+
pop({ upToSizeBytes, upToSize }) {
|
|
26820
26820
|
if (upToSizeBytes < 1) {
|
|
26821
26821
|
throw new Error("Number of bytes to pop off may not be less than 1.");
|
|
26822
26822
|
}
|
|
26823
26823
|
const popped = [];
|
|
26824
26824
|
let poppedSizeBytes = 0;
|
|
26825
|
-
while (poppedSizeBytes + (this.peek()?.size ?? 0) < upToSizeBytes && this.items.length > 0) {
|
|
26825
|
+
while (poppedSizeBytes + (this.peek()?.size ?? 0) < upToSizeBytes && this.items.length > 0 && popped.length < upToSize) {
|
|
26826
26826
|
const item = this.items.shift();
|
|
26827
26827
|
if (item) {
|
|
26828
26828
|
popped.push(item);
|
|
@@ -26850,6 +26850,7 @@ class AutoBatchQueue {
|
|
|
26850
26850
|
}
|
|
26851
26851
|
var DEFAULT_UNCOMPRESSED_BATCH_SIZE_LIMIT_BYTES = 24 * 1024 * 1024;
|
|
26852
26852
|
var SERVER_INFO_REQUEST_TIMEOUT_MS = 1e4;
|
|
26853
|
+
var DEFAULT_BATCH_SIZE_LIMIT = 100;
|
|
26853
26854
|
var DEFAULT_API_URL = "https://api.smith.langchain.com";
|
|
26854
26855
|
|
|
26855
26856
|
class Client {
|
|
@@ -26959,6 +26960,12 @@ class Client {
|
|
|
26959
26960
|
writable: true,
|
|
26960
26961
|
value: undefined
|
|
26961
26962
|
});
|
|
26963
|
+
Object.defineProperty(this, "batchSizeLimit", {
|
|
26964
|
+
enumerable: true,
|
|
26965
|
+
configurable: true,
|
|
26966
|
+
writable: true,
|
|
26967
|
+
value: undefined
|
|
26968
|
+
});
|
|
26962
26969
|
Object.defineProperty(this, "fetchOptions", {
|
|
26963
26970
|
enumerable: true,
|
|
26964
26971
|
configurable: true,
|
|
@@ -27061,6 +27068,7 @@ class Client {
|
|
|
27061
27068
|
this.autoBatchTracing = config.autoBatchTracing ?? this.autoBatchTracing;
|
|
27062
27069
|
this.blockOnRootRunFinalization = config.blockOnRootRunFinalization ?? this.blockOnRootRunFinalization;
|
|
27063
27070
|
this.batchSizeBytesLimit = config.batchSizeBytesLimit;
|
|
27071
|
+
this.batchSizeLimit = config.batchSizeLimit;
|
|
27064
27072
|
this.fetchOptions = config.fetchOptions || {};
|
|
27065
27073
|
this.manualFlushMode = config.manualFlushMode ?? this.manualFlushMode;
|
|
27066
27074
|
if (getOtelEnabled()) {
|
|
@@ -27280,14 +27288,21 @@ class Client {
|
|
|
27280
27288
|
const serverInfo = await this._ensureServerInfo();
|
|
27281
27289
|
return this.batchSizeBytesLimit ?? serverInfo.batch_ingest_config?.size_limit_bytes ?? DEFAULT_UNCOMPRESSED_BATCH_SIZE_LIMIT_BYTES;
|
|
27282
27290
|
}
|
|
27291
|
+
async _getBatchSizeLimit() {
|
|
27292
|
+
const serverInfo = await this._ensureServerInfo();
|
|
27293
|
+
return this.batchSizeLimit ?? serverInfo.batch_ingest_config?.size_limit ?? DEFAULT_BATCH_SIZE_LIMIT;
|
|
27294
|
+
}
|
|
27283
27295
|
async _getDatasetExamplesMultiPartSupport() {
|
|
27284
27296
|
const serverInfo = await this._ensureServerInfo();
|
|
27285
27297
|
return serverInfo.instance_flags?.dataset_examples_multipart_enabled ?? false;
|
|
27286
27298
|
}
|
|
27287
|
-
drainAutoBatchQueue(batchSizeLimit) {
|
|
27299
|
+
drainAutoBatchQueue({ batchSizeLimitBytes, batchSizeLimit }) {
|
|
27288
27300
|
const promises = [];
|
|
27289
27301
|
while (this.autoBatchQueue.items.length > 0) {
|
|
27290
|
-
const [batch, done] = this.autoBatchQueue.pop(
|
|
27302
|
+
const [batch, done] = this.autoBatchQueue.pop({
|
|
27303
|
+
upToSizeBytes: batchSizeLimitBytes,
|
|
27304
|
+
upToSize: batchSizeLimit
|
|
27305
|
+
});
|
|
27291
27306
|
if (!batch.length) {
|
|
27292
27307
|
done();
|
|
27293
27308
|
break;
|
|
@@ -27376,13 +27391,20 @@ class Client {
|
|
|
27376
27391
|
return itemPromise;
|
|
27377
27392
|
}
|
|
27378
27393
|
const sizeLimitBytes = await this._getBatchSizeLimitBytes();
|
|
27379
|
-
|
|
27380
|
-
|
|
27394
|
+
const sizeLimit = await this._getBatchSizeLimit();
|
|
27395
|
+
if (this.autoBatchQueue.sizeBytes > sizeLimitBytes || this.autoBatchQueue.items.length > sizeLimit) {
|
|
27396
|
+
this.drainAutoBatchQueue({
|
|
27397
|
+
batchSizeLimitBytes: sizeLimitBytes,
|
|
27398
|
+
batchSizeLimit: sizeLimit
|
|
27399
|
+
});
|
|
27381
27400
|
}
|
|
27382
27401
|
if (this.autoBatchQueue.items.length > 0) {
|
|
27383
27402
|
this.autoBatchTimeout = setTimeout(() => {
|
|
27384
27403
|
this.autoBatchTimeout = undefined;
|
|
27385
|
-
this.drainAutoBatchQueue(
|
|
27404
|
+
this.drainAutoBatchQueue({
|
|
27405
|
+
batchSizeLimitBytes: sizeLimitBytes,
|
|
27406
|
+
batchSizeLimit: sizeLimit
|
|
27407
|
+
});
|
|
27386
27408
|
}, this.autoBatchAggregationDelayMs);
|
|
27387
27409
|
}
|
|
27388
27410
|
return itemPromise;
|
|
@@ -27435,7 +27457,11 @@ class Client {
|
|
|
27435
27457
|
}
|
|
27436
27458
|
async flush() {
|
|
27437
27459
|
const sizeLimitBytes = await this._getBatchSizeLimitBytes();
|
|
27438
|
-
await this.
|
|
27460
|
+
const sizeLimit = await this._getBatchSizeLimit();
|
|
27461
|
+
await this.drainAutoBatchQueue({
|
|
27462
|
+
batchSizeLimitBytes: sizeLimitBytes,
|
|
27463
|
+
batchSizeLimit: sizeLimit
|
|
27464
|
+
});
|
|
27439
27465
|
}
|
|
27440
27466
|
_cloneCurrentOTELContext() {
|
|
27441
27467
|
const otel_trace = getOTELTrace();
|
|
@@ -46350,5 +46376,5 @@ export {
|
|
|
46350
46376
|
AgentRuntime
|
|
46351
46377
|
};
|
|
46352
46378
|
|
|
46353
|
-
//# debugId=
|
|
46379
|
+
//# debugId=714E2C90B3E960C464756E2164756E21
|
|
46354
46380
|
//# sourceMappingURL=index.node.js.map
|