@langfuse/core 4.4.2 → 4.4.3
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.cjs +53 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +296 -18
- package/dist/index.d.ts +296 -18
- package/dist/index.mjs +52 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -50,6 +50,7 @@ __export(index_exports, {
|
|
|
50
50
|
NotFoundError: () => NotFoundError,
|
|
51
51
|
ObservationLevel: () => ObservationLevel,
|
|
52
52
|
ObservationType: () => ObservationType,
|
|
53
|
+
PricingTierOperator: () => PricingTierOperator,
|
|
53
54
|
PromptType: () => PromptType,
|
|
54
55
|
ScoreDataType: () => ScoreDataType,
|
|
55
56
|
ScoreSource: () => ScoreSource,
|
|
@@ -350,7 +351,7 @@ var resetGlobalLogger = () => {
|
|
|
350
351
|
// package.json
|
|
351
352
|
var package_default = {
|
|
352
353
|
name: "@langfuse/core",
|
|
353
|
-
version: "4.4.
|
|
354
|
+
version: "4.4.3",
|
|
354
355
|
description: "Core functions and utilities for Langfuse packages",
|
|
355
356
|
type: "module",
|
|
356
357
|
sideEffects: false,
|
|
@@ -501,11 +502,22 @@ __export(commons_exports, {
|
|
|
501
502
|
ModelUsageUnit: () => ModelUsageUnit,
|
|
502
503
|
NotFoundError: () => NotFoundError,
|
|
503
504
|
ObservationLevel: () => ObservationLevel,
|
|
505
|
+
PricingTierOperator: () => PricingTierOperator,
|
|
504
506
|
ScoreDataType: () => ScoreDataType,
|
|
505
507
|
ScoreSource: () => ScoreSource,
|
|
506
508
|
UnauthorizedError: () => UnauthorizedError
|
|
507
509
|
});
|
|
508
510
|
|
|
511
|
+
// src/api/api/resources/commons/types/PricingTierOperator.ts
|
|
512
|
+
var PricingTierOperator = {
|
|
513
|
+
Gt: "gt",
|
|
514
|
+
Gte: "gte",
|
|
515
|
+
Lt: "lt",
|
|
516
|
+
Lte: "lte",
|
|
517
|
+
Eq: "eq",
|
|
518
|
+
Neq: "neq"
|
|
519
|
+
};
|
|
520
|
+
|
|
509
521
|
// src/api/api/resources/commons/types/ModelUsageUnit.ts
|
|
510
522
|
var ModelUsageUnit = {
|
|
511
523
|
Characters: "CHARACTERS",
|
|
@@ -745,6 +757,8 @@ var MediaContentType = {
|
|
|
745
757
|
ImageSvgXml: "image/svg+xml",
|
|
746
758
|
ImageTiff: "image/tiff",
|
|
747
759
|
ImageBmp: "image/bmp",
|
|
760
|
+
ImageAvif: "image/avif",
|
|
761
|
+
ImageHeic: "image/heic",
|
|
748
762
|
AudioMpeg: "audio/mpeg",
|
|
749
763
|
AudioMp3: "audio/mp3",
|
|
750
764
|
AudioWav: "audio/wav",
|
|
@@ -753,19 +767,40 @@ var MediaContentType = {
|
|
|
753
767
|
AudioAac: "audio/aac",
|
|
754
768
|
AudioMp4: "audio/mp4",
|
|
755
769
|
AudioFlac: "audio/flac",
|
|
770
|
+
AudioOpus: "audio/opus",
|
|
771
|
+
AudioWebm: "audio/webm",
|
|
756
772
|
VideoMp4: "video/mp4",
|
|
757
773
|
VideoWebm: "video/webm",
|
|
774
|
+
VideoOgg: "video/ogg",
|
|
775
|
+
VideoMpeg: "video/mpeg",
|
|
776
|
+
VideoQuicktime: "video/quicktime",
|
|
777
|
+
VideoXMsvideo: "video/x-msvideo",
|
|
778
|
+
VideoXMatroska: "video/x-matroska",
|
|
758
779
|
TextPlain: "text/plain",
|
|
759
780
|
TextHtml: "text/html",
|
|
760
781
|
TextCss: "text/css",
|
|
761
782
|
TextCsv: "text/csv",
|
|
783
|
+
TextMarkdown: "text/markdown",
|
|
784
|
+
TextXPython: "text/x-python",
|
|
785
|
+
ApplicationJavascript: "application/javascript",
|
|
786
|
+
TextXTypescript: "text/x-typescript",
|
|
787
|
+
ApplicationXYaml: "application/x-yaml",
|
|
762
788
|
ApplicationPdf: "application/pdf",
|
|
763
789
|
ApplicationMsword: "application/msword",
|
|
764
790
|
ApplicationMsExcel: "application/vnd.ms-excel",
|
|
791
|
+
ApplicationOpenxmlSpreadsheet: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
765
792
|
ApplicationZip: "application/zip",
|
|
766
793
|
ApplicationJson: "application/json",
|
|
767
794
|
ApplicationXml: "application/xml",
|
|
768
|
-
ApplicationOctetStream: "application/octet-stream"
|
|
795
|
+
ApplicationOctetStream: "application/octet-stream",
|
|
796
|
+
ApplicationOpenxmlWord: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
797
|
+
ApplicationOpenxmlPresentation: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
798
|
+
ApplicationRtf: "application/rtf",
|
|
799
|
+
ApplicationXNdjson: "application/x-ndjson",
|
|
800
|
+
ApplicationParquet: "application/vnd.apache.parquet",
|
|
801
|
+
ApplicationGzip: "application/gzip",
|
|
802
|
+
ApplicationXTar: "application/x-tar",
|
|
803
|
+
ApplicationX7ZCompressed: "application/x-7z-compressed"
|
|
769
804
|
};
|
|
770
805
|
|
|
771
806
|
// src/api/api/resources/metrics/index.ts
|
|
@@ -5195,7 +5230,8 @@ var LlmConnections = class {
|
|
|
5195
5230
|
* baseURL: undefined,
|
|
5196
5231
|
* customModels: undefined,
|
|
5197
5232
|
* withDefaultModels: undefined,
|
|
5198
|
-
* extraHeaders: undefined
|
|
5233
|
+
* extraHeaders: undefined,
|
|
5234
|
+
* config: undefined
|
|
5199
5235
|
* })
|
|
5200
5236
|
*/
|
|
5201
5237
|
upsert(request, requestOptions) {
|
|
@@ -5799,6 +5835,7 @@ var Models = class {
|
|
|
5799
5835
|
* inputPrice: undefined,
|
|
5800
5836
|
* outputPrice: undefined,
|
|
5801
5837
|
* totalPrice: undefined,
|
|
5838
|
+
* pricingTiers: undefined,
|
|
5802
5839
|
* tokenizerId: undefined,
|
|
5803
5840
|
* tokenizerConfig: undefined
|
|
5804
5841
|
* })
|
|
@@ -8309,7 +8346,8 @@ var PromptVersion = class {
|
|
|
8309
8346
|
/**
|
|
8310
8347
|
* Update labels for a specific prompt version
|
|
8311
8348
|
*
|
|
8312
|
-
* @param {string} name - The name of the prompt
|
|
8349
|
+
* @param {string} name - The name of the prompt. If the prompt is in a folder (e.g., "folder/subfolder/prompt-name"),
|
|
8350
|
+
* the folder path must be URL encoded.
|
|
8313
8351
|
* @param {number} version - Version of the prompt to update
|
|
8314
8352
|
* @param {LangfuseAPI.UpdatePromptRequest} request
|
|
8315
8353
|
* @param {PromptVersion.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -8437,7 +8475,8 @@ var Prompts = class {
|
|
|
8437
8475
|
/**
|
|
8438
8476
|
* Get a prompt
|
|
8439
8477
|
*
|
|
8440
|
-
* @param {string} promptName - The name of the prompt
|
|
8478
|
+
* @param {string} promptName - The name of the prompt. If the prompt is in a folder (e.g., "folder/subfolder/prompt-name"),
|
|
8479
|
+
* the folder path must be URL encoded.
|
|
8441
8480
|
* @param {LangfuseAPI.GetPromptRequest} request
|
|
8442
8481
|
* @param {Prompts.RequestOptions} requestOptions - Request-specific configuration.
|
|
8443
8482
|
*
|
|
@@ -10065,6 +10104,8 @@ var ScoreV2 = class {
|
|
|
10065
10104
|
scoreIds,
|
|
10066
10105
|
configId,
|
|
10067
10106
|
sessionId,
|
|
10107
|
+
datasetRunId,
|
|
10108
|
+
traceId,
|
|
10068
10109
|
queueId,
|
|
10069
10110
|
dataType,
|
|
10070
10111
|
traceTags
|
|
@@ -10113,6 +10154,12 @@ var ScoreV2 = class {
|
|
|
10113
10154
|
if (sessionId != null) {
|
|
10114
10155
|
_queryParams["sessionId"] = sessionId;
|
|
10115
10156
|
}
|
|
10157
|
+
if (datasetRunId != null) {
|
|
10158
|
+
_queryParams["datasetRunId"] = datasetRunId;
|
|
10159
|
+
}
|
|
10160
|
+
if (traceId != null) {
|
|
10161
|
+
_queryParams["traceId"] = traceId;
|
|
10162
|
+
}
|
|
10116
10163
|
if (queueId != null) {
|
|
10117
10164
|
_queryParams["queueId"] = queueId;
|
|
10118
10165
|
}
|
|
@@ -11979,6 +12026,7 @@ function getSpanKeyFromBaggageKey(baggageKey) {
|
|
|
11979
12026
|
NotFoundError,
|
|
11980
12027
|
ObservationLevel,
|
|
11981
12028
|
ObservationType,
|
|
12029
|
+
PricingTierOperator,
|
|
11982
12030
|
PromptType,
|
|
11983
12031
|
ScoreDataType,
|
|
11984
12032
|
ScoreSource,
|