@langfuse/client 4.5.0 → 4.6.0
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/LICENSE +4 -1
- package/dist/index.cjs +8 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.mjs +9 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -521,7 +521,13 @@ declare class DatasetManager {
|
|
|
521
521
|
* @since 4.0.0
|
|
522
522
|
*/
|
|
523
523
|
get(name: string, options?: {
|
|
524
|
-
fetchItemsPageSize
|
|
524
|
+
fetchItemsPageSize?: number;
|
|
525
|
+
/**
|
|
526
|
+
* ISO 8601 timestamp (RFC 3339, Section 5.6) in UTC (e.g., "2026-01-21T14:35:42Z").
|
|
527
|
+
* If provided, returns state of dataset at this timestamp.
|
|
528
|
+
* If not provided, returns the latest version.
|
|
529
|
+
*/
|
|
530
|
+
version?: string;
|
|
525
531
|
}): Promise<FetchedDataset>;
|
|
526
532
|
/**
|
|
527
533
|
* Creates a link function for a specific dataset item.
|
package/dist/index.d.ts
CHANGED
|
@@ -521,7 +521,13 @@ declare class DatasetManager {
|
|
|
521
521
|
* @since 4.0.0
|
|
522
522
|
*/
|
|
523
523
|
get(name: string, options?: {
|
|
524
|
-
fetchItemsPageSize
|
|
524
|
+
fetchItemsPageSize?: number;
|
|
525
|
+
/**
|
|
526
|
+
* ISO 8601 timestamp (RFC 3339, Section 5.6) in UTC (e.g., "2026-01-21T14:35:42Z").
|
|
527
|
+
* If provided, returns state of dataset at this timestamp.
|
|
528
|
+
* If not provided, returns the latest version.
|
|
529
|
+
*/
|
|
530
|
+
version?: string;
|
|
525
531
|
}): Promise<FetchedDataset>;
|
|
526
532
|
/**
|
|
527
533
|
* Creates a link function for a specific dataset item.
|
package/dist/index.mjs
CHANGED
|
@@ -103,7 +103,8 @@ var DatasetManager = class {
|
|
|
103
103
|
const itemsResponse = await this.langfuseClient.api.datasetItems.list({
|
|
104
104
|
datasetName: name,
|
|
105
105
|
limit: (_a = options == null ? void 0 : options.fetchItemsPageSize) != null ? _a : 50,
|
|
106
|
-
page
|
|
106
|
+
page,
|
|
107
|
+
...(options == null ? void 0 : options.version) && { version: options.version }
|
|
107
108
|
});
|
|
108
109
|
items.push(...itemsResponse.data);
|
|
109
110
|
if (itemsResponse.meta.totalPages <= page) {
|
|
@@ -1579,6 +1580,7 @@ import {
|
|
|
1579
1580
|
getEnv,
|
|
1580
1581
|
generateUUID,
|
|
1581
1582
|
getGlobalLogger as getGlobalLogger5,
|
|
1583
|
+
LogLevel,
|
|
1582
1584
|
safeSetTimeout
|
|
1583
1585
|
} from "@langfuse/core";
|
|
1584
1586
|
import { trace as trace2 } from "@opentelemetry/api";
|
|
@@ -1643,10 +1645,12 @@ var ScoreManager = class {
|
|
|
1643
1645
|
return;
|
|
1644
1646
|
}
|
|
1645
1647
|
this.eventQueue.push(scoreIngestionEvent);
|
|
1646
|
-
this.logger.
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1648
|
+
if (this.logger.isLevelEnabled(LogLevel.DEBUG)) {
|
|
1649
|
+
this.logger.debug(
|
|
1650
|
+
"Added score event to queue:\n",
|
|
1651
|
+
JSON.stringify(scoreIngestionEvent, null, 2)
|
|
1652
|
+
);
|
|
1653
|
+
}
|
|
1650
1654
|
if (this.eventQueue.length >= this.flushAtCount) {
|
|
1651
1655
|
this.flushPromise = this.flush();
|
|
1652
1656
|
} else if (!this.flushTimer) {
|