@langfuse/core 4.6.1 → 5.0.0-beta.1
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 +46 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +146 -34
- package/dist/index.d.ts +146 -34
- package/dist/index.mjs +42 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -27,7 +27,10 @@ __export(index_exports, {
|
|
|
27
27
|
BlobStorageExportMode: () => BlobStorageExportMode,
|
|
28
28
|
BlobStorageIntegrationFileType: () => BlobStorageIntegrationFileType,
|
|
29
29
|
BlobStorageIntegrationType: () => BlobStorageIntegrationType,
|
|
30
|
+
ChatMessageType: () => ChatMessageType,
|
|
30
31
|
CommentObjectType: () => CommentObjectType,
|
|
32
|
+
CreateChatPromptType: () => CreateChatPromptType,
|
|
33
|
+
CreateTextPromptType: () => CreateTextPromptType,
|
|
31
34
|
DatasetStatus: () => DatasetStatus,
|
|
32
35
|
Error: () => Error2,
|
|
33
36
|
LANGFUSE_SDK_EXPERIMENT_ENVIRONMENT: () => LANGFUSE_SDK_EXPERIMENT_ENVIRONMENT,
|
|
@@ -50,6 +53,7 @@ __export(index_exports, {
|
|
|
50
53
|
NotFoundError: () => NotFoundError,
|
|
51
54
|
ObservationLevel: () => ObservationLevel,
|
|
52
55
|
ObservationType: () => ObservationType,
|
|
56
|
+
PlaceholderMessageType: () => PlaceholderMessageType,
|
|
53
57
|
PricingTierOperator: () => PricingTierOperator,
|
|
54
58
|
PromptType: () => PromptType,
|
|
55
59
|
ScoreConfigDataType: () => ScoreConfigDataType,
|
|
@@ -188,7 +192,10 @@ var LogLevel = /* @__PURE__ */ ((LogLevel2) => {
|
|
|
188
192
|
return LogLevel2;
|
|
189
193
|
})(LogLevel || {});
|
|
190
194
|
function parseLogLevelFromEnv() {
|
|
195
|
+
var _a2;
|
|
191
196
|
if (typeof process === "object" && "env" in process) {
|
|
197
|
+
if (((_a2 = getEnv("LANGFUSE_DEBUG")) == null ? void 0 : _a2.toLowerCase()) === "true")
|
|
198
|
+
return 0 /* DEBUG */;
|
|
192
199
|
const envValue = getEnv("LANGFUSE_LOG_LEVEL");
|
|
193
200
|
const value = (envValue != null ? envValue : "").toUpperCase();
|
|
194
201
|
switch (value) {
|
|
@@ -371,7 +378,7 @@ var resetGlobalLogger = () => {
|
|
|
371
378
|
// package.json
|
|
372
379
|
var package_default = {
|
|
373
380
|
name: "@langfuse/core",
|
|
374
|
-
version: "
|
|
381
|
+
version: "5.0.0-beta.0",
|
|
375
382
|
description: "Core functions and utilities for Langfuse packages",
|
|
376
383
|
type: "module",
|
|
377
384
|
sideEffects: false,
|
|
@@ -875,6 +882,10 @@ var projects_exports = {};
|
|
|
875
882
|
// src/api/api/resources/prompts/index.ts
|
|
876
883
|
var prompts_exports = {};
|
|
877
884
|
__export(prompts_exports, {
|
|
885
|
+
ChatMessageType: () => ChatMessageType,
|
|
886
|
+
CreateChatPromptType: () => CreateChatPromptType,
|
|
887
|
+
CreateTextPromptType: () => CreateTextPromptType,
|
|
888
|
+
PlaceholderMessageType: () => PlaceholderMessageType,
|
|
878
889
|
PromptType: () => PromptType
|
|
879
890
|
});
|
|
880
891
|
|
|
@@ -884,6 +895,26 @@ var PromptType = {
|
|
|
884
895
|
Text: "text"
|
|
885
896
|
};
|
|
886
897
|
|
|
898
|
+
// src/api/api/resources/prompts/types/ChatMessageType.ts
|
|
899
|
+
var ChatMessageType = {
|
|
900
|
+
Chatmessage: "chatmessage"
|
|
901
|
+
};
|
|
902
|
+
|
|
903
|
+
// src/api/api/resources/prompts/types/PlaceholderMessageType.ts
|
|
904
|
+
var PlaceholderMessageType = {
|
|
905
|
+
Placeholder: "placeholder"
|
|
906
|
+
};
|
|
907
|
+
|
|
908
|
+
// src/api/api/resources/prompts/types/CreateChatPromptType.ts
|
|
909
|
+
var CreateChatPromptType = {
|
|
910
|
+
Chat: "chat"
|
|
911
|
+
};
|
|
912
|
+
|
|
913
|
+
// src/api/api/resources/prompts/types/CreateTextPromptType.ts
|
|
914
|
+
var CreateTextPromptType = {
|
|
915
|
+
Text: "text"
|
|
916
|
+
};
|
|
917
|
+
|
|
887
918
|
// src/api/api/resources/scim/index.ts
|
|
888
919
|
var scim_exports = {};
|
|
889
920
|
|
|
@@ -9222,18 +9253,18 @@ var Prompts = class {
|
|
|
9222
9253
|
*
|
|
9223
9254
|
* @example
|
|
9224
9255
|
* await client.prompts.create({
|
|
9225
|
-
* type: "chat",
|
|
9226
9256
|
* name: "name",
|
|
9227
9257
|
* prompt: [{
|
|
9228
|
-
* type: "chatmessage",
|
|
9229
9258
|
* role: "role",
|
|
9230
|
-
* content: "content"
|
|
9259
|
+
* content: "content",
|
|
9260
|
+
* type: undefined
|
|
9231
9261
|
* }, {
|
|
9232
|
-
* type: "chatmessage",
|
|
9233
9262
|
* role: "role",
|
|
9234
|
-
* content: "content"
|
|
9263
|
+
* content: "content",
|
|
9264
|
+
* type: undefined
|
|
9235
9265
|
* }],
|
|
9236
9266
|
* config: undefined,
|
|
9267
|
+
* type: "chat",
|
|
9237
9268
|
* labels: undefined,
|
|
9238
9269
|
* tags: undefined,
|
|
9239
9270
|
* commitMessage: undefined
|
|
@@ -10716,7 +10747,8 @@ var ScoreV2 = class {
|
|
|
10716
10747
|
queueId,
|
|
10717
10748
|
dataType,
|
|
10718
10749
|
traceTags,
|
|
10719
|
-
fields
|
|
10750
|
+
fields,
|
|
10751
|
+
filter
|
|
10720
10752
|
} = request;
|
|
10721
10753
|
const _queryParams = {};
|
|
10722
10754
|
if (page != null) {
|
|
@@ -10787,6 +10819,9 @@ var ScoreV2 = class {
|
|
|
10787
10819
|
if (fields != null) {
|
|
10788
10820
|
_queryParams["fields"] = fields;
|
|
10789
10821
|
}
|
|
10822
|
+
if (filter != null) {
|
|
10823
|
+
_queryParams["filter"] = filter;
|
|
10824
|
+
}
|
|
10790
10825
|
let _headers = mergeHeaders(
|
|
10791
10826
|
(_a2 = this._options) == null ? void 0 : _a2.headers,
|
|
10792
10827
|
mergeOnlyDefinedHeaders({
|
|
@@ -12659,7 +12694,10 @@ function getSpanKeyFromBaggageKey(baggageKey) {
|
|
|
12659
12694
|
BlobStorageExportMode,
|
|
12660
12695
|
BlobStorageIntegrationFileType,
|
|
12661
12696
|
BlobStorageIntegrationType,
|
|
12697
|
+
ChatMessageType,
|
|
12662
12698
|
CommentObjectType,
|
|
12699
|
+
CreateChatPromptType,
|
|
12700
|
+
CreateTextPromptType,
|
|
12663
12701
|
DatasetStatus,
|
|
12664
12702
|
Error,
|
|
12665
12703
|
LANGFUSE_SDK_EXPERIMENT_ENVIRONMENT,
|
|
@@ -12682,6 +12720,7 @@ function getSpanKeyFromBaggageKey(baggageKey) {
|
|
|
12682
12720
|
NotFoundError,
|
|
12683
12721
|
ObservationLevel,
|
|
12684
12722
|
ObservationType,
|
|
12723
|
+
PlaceholderMessageType,
|
|
12685
12724
|
PricingTierOperator,
|
|
12686
12725
|
PromptType,
|
|
12687
12726
|
ScoreConfigDataType,
|