@langfuse/core 5.0.2 → 5.1.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/dist/index.cjs +15 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +81 -13
- package/dist/index.d.ts +81 -13
- package/dist/index.mjs +15 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1003,6 +1003,15 @@ interface CategoricalScoreV1 extends BaseScoreV1 {
|
|
|
1003
1003
|
stringValue: string;
|
|
1004
1004
|
}
|
|
1005
1005
|
|
|
1006
|
+
/**
|
|
1007
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1008
|
+
*/
|
|
1009
|
+
|
|
1010
|
+
interface TextScoreV1 extends BaseScoreV1 {
|
|
1011
|
+
/** The text content of the score (1-500 characters) */
|
|
1012
|
+
stringValue: string;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1006
1015
|
/**
|
|
1007
1016
|
* This file was auto-generated by Fern from our API Definition.
|
|
1008
1017
|
*/
|
|
@@ -1016,7 +1025,10 @@ ScoreV1$1.Numeric
|
|
|
1016
1025
|
| ScoreV1$1.Categorical
|
|
1017
1026
|
/**
|
|
1018
1027
|
* Score with BOOLEAN data type */
|
|
1019
|
-
| ScoreV1$1.Boolean
|
|
1028
|
+
| ScoreV1$1.Boolean
|
|
1029
|
+
/**
|
|
1030
|
+
* Score with TEXT data type */
|
|
1031
|
+
| ScoreV1$1.Text;
|
|
1020
1032
|
declare namespace ScoreV1$1 {
|
|
1021
1033
|
interface Numeric extends NumericScoreV1 {
|
|
1022
1034
|
dataType: "NUMERIC";
|
|
@@ -1027,6 +1039,9 @@ declare namespace ScoreV1$1 {
|
|
|
1027
1039
|
interface Boolean extends BooleanScoreV1 {
|
|
1028
1040
|
dataType: "BOOLEAN";
|
|
1029
1041
|
}
|
|
1042
|
+
interface Text extends TextScoreV1 {
|
|
1043
|
+
dataType: "TEXT";
|
|
1044
|
+
}
|
|
1030
1045
|
}
|
|
1031
1046
|
|
|
1032
1047
|
/**
|
|
@@ -1104,6 +1119,15 @@ interface CorrectionScore extends BaseScore {
|
|
|
1104
1119
|
stringValue: string;
|
|
1105
1120
|
}
|
|
1106
1121
|
|
|
1122
|
+
/**
|
|
1123
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1124
|
+
*/
|
|
1125
|
+
|
|
1126
|
+
interface TextScore extends BaseScore {
|
|
1127
|
+
/** The text content of the score (1-500 characters) */
|
|
1128
|
+
stringValue: string;
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1107
1131
|
/**
|
|
1108
1132
|
* This file was auto-generated by Fern from our API Definition.
|
|
1109
1133
|
*/
|
|
@@ -1120,7 +1144,10 @@ Score.Numeric
|
|
|
1120
1144
|
| Score.Boolean
|
|
1121
1145
|
/**
|
|
1122
1146
|
* Score with CORRECTION data type */
|
|
1123
|
-
| Score.Correction
|
|
1147
|
+
| Score.Correction
|
|
1148
|
+
/**
|
|
1149
|
+
* Score with TEXT data type */
|
|
1150
|
+
| Score.Text;
|
|
1124
1151
|
declare namespace Score {
|
|
1125
1152
|
interface Numeric extends NumericScore {
|
|
1126
1153
|
dataType: "NUMERIC";
|
|
@@ -1134,13 +1161,16 @@ declare namespace Score {
|
|
|
1134
1161
|
interface Correction extends CorrectionScore {
|
|
1135
1162
|
dataType: "CORRECTION";
|
|
1136
1163
|
}
|
|
1164
|
+
interface Text extends TextScore {
|
|
1165
|
+
dataType: "TEXT";
|
|
1166
|
+
}
|
|
1137
1167
|
}
|
|
1138
1168
|
|
|
1139
1169
|
/**
|
|
1140
1170
|
* This file was auto-generated by Fern from our API Definition.
|
|
1141
1171
|
*/
|
|
1142
1172
|
/**
|
|
1143
|
-
* The value of the score. Must be passed as string for categorical scores, and numeric for boolean and numeric scores
|
|
1173
|
+
* The value of the score. Must be passed as string for categorical and text scores, and numeric for boolean and numeric scores
|
|
1144
1174
|
*/
|
|
1145
1175
|
type CreateScoreValue = number | string;
|
|
1146
1176
|
|
|
@@ -1573,22 +1603,24 @@ declare const ScoreSource: {
|
|
|
1573
1603
|
/**
|
|
1574
1604
|
* This file was auto-generated by Fern from our API Definition.
|
|
1575
1605
|
*/
|
|
1576
|
-
type ScoreConfigDataType = "NUMERIC" | "BOOLEAN" | "CATEGORICAL";
|
|
1606
|
+
type ScoreConfigDataType = "NUMERIC" | "BOOLEAN" | "CATEGORICAL" | "TEXT";
|
|
1577
1607
|
declare const ScoreConfigDataType: {
|
|
1578
1608
|
readonly Numeric: "NUMERIC";
|
|
1579
1609
|
readonly Boolean: "BOOLEAN";
|
|
1580
1610
|
readonly Categorical: "CATEGORICAL";
|
|
1611
|
+
readonly Text: "TEXT";
|
|
1581
1612
|
};
|
|
1582
1613
|
|
|
1583
1614
|
/**
|
|
1584
1615
|
* This file was auto-generated by Fern from our API Definition.
|
|
1585
1616
|
*/
|
|
1586
|
-
type ScoreDataType = "NUMERIC" | "BOOLEAN" | "CATEGORICAL" | "CORRECTION";
|
|
1617
|
+
type ScoreDataType = "NUMERIC" | "BOOLEAN" | "CATEGORICAL" | "CORRECTION" | "TEXT";
|
|
1587
1618
|
declare const ScoreDataType: {
|
|
1588
1619
|
readonly Numeric: "NUMERIC";
|
|
1589
1620
|
readonly Boolean: "BOOLEAN";
|
|
1590
1621
|
readonly Categorical: "CATEGORICAL";
|
|
1591
1622
|
readonly Correction: "CORRECTION";
|
|
1623
|
+
readonly Text: "TEXT";
|
|
1592
1624
|
};
|
|
1593
1625
|
|
|
1594
1626
|
/**
|
|
@@ -1775,13 +1807,15 @@ declare const index$q_ScoreDataType: typeof ScoreDataType;
|
|
|
1775
1807
|
declare const index$q_ScoreSource: typeof ScoreSource;
|
|
1776
1808
|
type index$q_Session = Session;
|
|
1777
1809
|
type index$q_SessionWithTraces = SessionWithTraces;
|
|
1810
|
+
type index$q_TextScore = TextScore;
|
|
1811
|
+
type index$q_TextScoreV1 = TextScoreV1;
|
|
1778
1812
|
type index$q_TraceWithDetails = TraceWithDetails;
|
|
1779
1813
|
type index$q_TraceWithFullDetails = TraceWithFullDetails;
|
|
1780
1814
|
type index$q_UnauthorizedError = UnauthorizedError;
|
|
1781
1815
|
declare const index$q_UnauthorizedError: typeof UnauthorizedError;
|
|
1782
1816
|
type index$q_Usage = Usage;
|
|
1783
1817
|
declare namespace index$q {
|
|
1784
|
-
export { index$q_AccessDeniedError as AccessDeniedError, type index$q_BaseScore as BaseScore, type index$q_BaseScoreV1 as BaseScoreV1, type index$q_BooleanScore as BooleanScore, type index$q_BooleanScoreV1 as BooleanScoreV1, type index$q_CategoricalScore as CategoricalScore, type index$q_CategoricalScoreV1 as CategoricalScoreV1, type index$q_Comment as Comment, index$q_CommentObjectType as CommentObjectType, type index$q_ConfigCategory as ConfigCategory, type index$q_CorrectionScore as CorrectionScore, type index$q_CreateScoreValue as CreateScoreValue, type index$q_Dataset as Dataset, type index$q_DatasetItem as DatasetItem, type index$q_DatasetRun as DatasetRun, type index$q_DatasetRunItem as DatasetRunItem, type index$q_DatasetRunWithItems as DatasetRunWithItems, index$q_DatasetStatus as DatasetStatus, Error$1 as Error, type index$q_MapValue as MapValue, index$q_MethodNotAllowedError as MethodNotAllowedError, type index$q_Model as Model, type index$q_ModelPrice as ModelPrice, index$q_ModelUsageUnit as ModelUsageUnit, index$q_NotFoundError as NotFoundError, type index$q_NumericScore as NumericScore, type index$q_NumericScoreV1 as NumericScoreV1, type index$q_Observation as Observation, index$q_ObservationLevel as ObservationLevel, type index$q_ObservationV2 as ObservationV2, type index$q_ObservationsView as ObservationsView, type index$q_PricingTier as PricingTier, type index$q_PricingTierCondition as PricingTierCondition, type index$q_PricingTierInput as PricingTierInput, index$q_PricingTierOperator as PricingTierOperator, index$q_Score as Score, type index$q_ScoreConfig as ScoreConfig, index$q_ScoreConfigDataType as ScoreConfigDataType, index$q_ScoreDataType as ScoreDataType, index$q_ScoreSource as ScoreSource, ScoreV1$1 as ScoreV1, type index$q_Session as Session, type index$q_SessionWithTraces as SessionWithTraces, type Trace$1 as Trace, type index$q_TraceWithDetails as TraceWithDetails, type index$q_TraceWithFullDetails as TraceWithFullDetails, index$q_UnauthorizedError as UnauthorizedError, type index$q_Usage as Usage };
|
|
1818
|
+
export { index$q_AccessDeniedError as AccessDeniedError, type index$q_BaseScore as BaseScore, type index$q_BaseScoreV1 as BaseScoreV1, type index$q_BooleanScore as BooleanScore, type index$q_BooleanScoreV1 as BooleanScoreV1, type index$q_CategoricalScore as CategoricalScore, type index$q_CategoricalScoreV1 as CategoricalScoreV1, type index$q_Comment as Comment, index$q_CommentObjectType as CommentObjectType, type index$q_ConfigCategory as ConfigCategory, type index$q_CorrectionScore as CorrectionScore, type index$q_CreateScoreValue as CreateScoreValue, type index$q_Dataset as Dataset, type index$q_DatasetItem as DatasetItem, type index$q_DatasetRun as DatasetRun, type index$q_DatasetRunItem as DatasetRunItem, type index$q_DatasetRunWithItems as DatasetRunWithItems, index$q_DatasetStatus as DatasetStatus, Error$1 as Error, type index$q_MapValue as MapValue, index$q_MethodNotAllowedError as MethodNotAllowedError, type index$q_Model as Model, type index$q_ModelPrice as ModelPrice, index$q_ModelUsageUnit as ModelUsageUnit, index$q_NotFoundError as NotFoundError, type index$q_NumericScore as NumericScore, type index$q_NumericScoreV1 as NumericScoreV1, type index$q_Observation as Observation, index$q_ObservationLevel as ObservationLevel, type index$q_ObservationV2 as ObservationV2, type index$q_ObservationsView as ObservationsView, type index$q_PricingTier as PricingTier, type index$q_PricingTierCondition as PricingTierCondition, type index$q_PricingTierInput as PricingTierInput, index$q_PricingTierOperator as PricingTierOperator, index$q_Score as Score, type index$q_ScoreConfig as ScoreConfig, index$q_ScoreConfigDataType as ScoreConfigDataType, index$q_ScoreDataType as ScoreDataType, index$q_ScoreSource as ScoreSource, ScoreV1$1 as ScoreV1, type index$q_Session as Session, type index$q_SessionWithTraces as SessionWithTraces, type index$q_TextScore as TextScore, type index$q_TextScoreV1 as TextScoreV1, type Trace$1 as Trace, type index$q_TraceWithDetails as TraceWithDetails, type index$q_TraceWithFullDetails as TraceWithFullDetails, index$q_UnauthorizedError as UnauthorizedError, type index$q_Usage as Usage };
|
|
1785
1819
|
}
|
|
1786
1820
|
|
|
1787
1821
|
/**
|
|
@@ -2337,7 +2371,7 @@ interface ScoreBody {
|
|
|
2337
2371
|
environment?: string;
|
|
2338
2372
|
/** The annotation queue referenced by the score. Indicates if score was initially created while processing annotation queue. */
|
|
2339
2373
|
queueId?: string;
|
|
2340
|
-
/** The value of the score. Must be passed as string for categorical scores, and numeric for boolean and numeric scores. Boolean score values must equal either 1 or 0 (true or false) */
|
|
2374
|
+
/** The value of the score. Must be passed as string for categorical and text scores, and numeric for boolean and numeric scores. Boolean score values must equal either 1 or 0 (true or false). Text score values must be between 1 and 500 characters. */
|
|
2341
2375
|
value: CreateScoreValue;
|
|
2342
2376
|
comment?: string;
|
|
2343
2377
|
metadata?: unknown;
|
|
@@ -2891,6 +2925,14 @@ declare namespace index$j {
|
|
|
2891
2925
|
* configId: "1234-5678-90ab-cdef",
|
|
2892
2926
|
* traceId: "cdef-1234-5678-90ab"
|
|
2893
2927
|
* }
|
|
2928
|
+
*
|
|
2929
|
+
* @example
|
|
2930
|
+
* {
|
|
2931
|
+
* name: "feedback",
|
|
2932
|
+
* value: "Great explanation of the concept",
|
|
2933
|
+
* dataType: LangfuseAPI.ScoreDataType.Text,
|
|
2934
|
+
* traceId: "cdef-1234-5678-90ab"
|
|
2935
|
+
* }
|
|
2894
2936
|
*/
|
|
2895
2937
|
interface CreateScoreRequest {
|
|
2896
2938
|
id?: string;
|
|
@@ -2899,7 +2941,7 @@ interface CreateScoreRequest {
|
|
|
2899
2941
|
observationId?: string;
|
|
2900
2942
|
datasetRunId?: string;
|
|
2901
2943
|
name: string;
|
|
2902
|
-
/** The value of the score. Must be passed as string for categorical scores, and numeric for boolean and numeric scores. Boolean score values must equal either 1 or 0 (true or false) */
|
|
2944
|
+
/** The value of the score. Must be passed as string for categorical and text scores, and numeric for boolean and numeric scores. Boolean score values must equal either 1 or 0 (true or false). Text score values must be between 1 and 500 characters. */
|
|
2903
2945
|
value: CreateScoreValue;
|
|
2904
2946
|
comment?: string;
|
|
2905
2947
|
metadata?: Record<string, unknown>;
|
|
@@ -4583,7 +4625,15 @@ interface GetScoresResponseDataCorrection extends CorrectionScore {
|
|
|
4583
4625
|
* This file was auto-generated by Fern from our API Definition.
|
|
4584
4626
|
*/
|
|
4585
4627
|
|
|
4586
|
-
|
|
4628
|
+
interface GetScoresResponseDataText extends TextScore {
|
|
4629
|
+
trace?: GetScoresResponseTraceData;
|
|
4630
|
+
}
|
|
4631
|
+
|
|
4632
|
+
/**
|
|
4633
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4634
|
+
*/
|
|
4635
|
+
|
|
4636
|
+
type GetScoresResponseData = GetScoresResponseData.Numeric | GetScoresResponseData.Categorical | GetScoresResponseData.Boolean | GetScoresResponseData.Correction | GetScoresResponseData.Text;
|
|
4587
4637
|
declare namespace GetScoresResponseData {
|
|
4588
4638
|
interface Numeric extends GetScoresResponseDataNumeric {
|
|
4589
4639
|
dataType: "NUMERIC";
|
|
@@ -4597,6 +4647,9 @@ declare namespace GetScoresResponseData {
|
|
|
4597
4647
|
interface Correction extends GetScoresResponseDataCorrection {
|
|
4598
4648
|
dataType: "CORRECTION";
|
|
4599
4649
|
}
|
|
4650
|
+
interface Text extends GetScoresResponseDataText {
|
|
4651
|
+
dataType: "TEXT";
|
|
4652
|
+
}
|
|
4600
4653
|
}
|
|
4601
4654
|
|
|
4602
4655
|
/**
|
|
@@ -4668,9 +4721,10 @@ type index$5_GetScoresResponseDataBoolean = GetScoresResponseDataBoolean;
|
|
|
4668
4721
|
type index$5_GetScoresResponseDataCategorical = GetScoresResponseDataCategorical;
|
|
4669
4722
|
type index$5_GetScoresResponseDataCorrection = GetScoresResponseDataCorrection;
|
|
4670
4723
|
type index$5_GetScoresResponseDataNumeric = GetScoresResponseDataNumeric;
|
|
4724
|
+
type index$5_GetScoresResponseDataText = GetScoresResponseDataText;
|
|
4671
4725
|
type index$5_GetScoresResponseTraceData = GetScoresResponseTraceData;
|
|
4672
4726
|
declare namespace index$5 {
|
|
4673
|
-
export { type index$5_GetScoresRequest as GetScoresRequest, type index$5_GetScoresResponse as GetScoresResponse, index$5_GetScoresResponseData as GetScoresResponseData, type index$5_GetScoresResponseDataBoolean as GetScoresResponseDataBoolean, type index$5_GetScoresResponseDataCategorical as GetScoresResponseDataCategorical, type index$5_GetScoresResponseDataCorrection as GetScoresResponseDataCorrection, type index$5_GetScoresResponseDataNumeric as GetScoresResponseDataNumeric, type index$5_GetScoresResponseTraceData as GetScoresResponseTraceData };
|
|
4727
|
+
export { type index$5_GetScoresRequest as GetScoresRequest, type index$5_GetScoresResponse as GetScoresResponse, index$5_GetScoresResponseData as GetScoresResponseData, type index$5_GetScoresResponseDataBoolean as GetScoresResponseDataBoolean, type index$5_GetScoresResponseDataCategorical as GetScoresResponseDataCategorical, type index$5_GetScoresResponseDataCorrection as GetScoresResponseDataCorrection, type index$5_GetScoresResponseDataNumeric as GetScoresResponseDataNumeric, type index$5_GetScoresResponseDataText as GetScoresResponseDataText, type index$5_GetScoresResponseTraceData as GetScoresResponseTraceData };
|
|
4674
4728
|
}
|
|
4675
4729
|
|
|
4676
4730
|
/**
|
|
@@ -4731,6 +4785,18 @@ interface Sort {
|
|
|
4731
4785
|
id: string;
|
|
4732
4786
|
}
|
|
4733
4787
|
|
|
4788
|
+
/**
|
|
4789
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4790
|
+
*/
|
|
4791
|
+
/**
|
|
4792
|
+
* @example
|
|
4793
|
+
* {}
|
|
4794
|
+
*/
|
|
4795
|
+
interface GetTraceRequest {
|
|
4796
|
+
/** Comma-separated list of fields to include in the response. Available field groups: 'core' (always included), 'io' (input, output, metadata), 'scores', 'observations', 'metrics'. If not specified, all fields are returned. Example: 'core,scores,metrics'. Note: Excluded 'observations' or 'scores' fields return empty arrays; excluded 'metrics' returns -1 for 'totalCost' and 'latency'. */
|
|
4797
|
+
fields?: string;
|
|
4798
|
+
}
|
|
4799
|
+
|
|
4734
4800
|
/**
|
|
4735
4801
|
* This file was auto-generated by Fern from our API Definition.
|
|
4736
4802
|
*/
|
|
@@ -4888,11 +4954,12 @@ interface DeleteTracesRequest {
|
|
|
4888
4954
|
|
|
4889
4955
|
type index$3_DeleteTraceResponse = DeleteTraceResponse;
|
|
4890
4956
|
type index$3_DeleteTracesRequest = DeleteTracesRequest;
|
|
4957
|
+
type index$3_GetTraceRequest = GetTraceRequest;
|
|
4891
4958
|
type index$3_GetTracesRequest = GetTracesRequest;
|
|
4892
4959
|
type index$3_Sort = Sort;
|
|
4893
4960
|
type index$3_Traces = Traces;
|
|
4894
4961
|
declare namespace index$3 {
|
|
4895
|
-
export type { index$3_DeleteTraceResponse as DeleteTraceResponse, index$3_DeleteTracesRequest as DeleteTracesRequest, index$3_GetTracesRequest as GetTracesRequest, index$3_Sort as Sort, index$3_Traces as Traces };
|
|
4962
|
+
export type { index$3_DeleteTraceResponse as DeleteTraceResponse, index$3_DeleteTracesRequest as DeleteTracesRequest, index$3_GetTraceRequest as GetTraceRequest, index$3_GetTracesRequest as GetTracesRequest, index$3_Sort as Sort, index$3_Traces as Traces };
|
|
4896
4963
|
}
|
|
4897
4964
|
|
|
4898
4965
|
/**
|
|
@@ -7991,6 +8058,7 @@ declare class Trace {
|
|
|
7991
8058
|
* Get a specific trace
|
|
7992
8059
|
*
|
|
7993
8060
|
* @param {string} traceId - The unique langfuse identifier of a trace
|
|
8061
|
+
* @param {LangfuseAPI.GetTraceRequest} request
|
|
7994
8062
|
* @param {Trace.RequestOptions} requestOptions - Request-specific configuration.
|
|
7995
8063
|
*
|
|
7996
8064
|
* @throws {@link LangfuseAPI.Error}
|
|
@@ -8002,7 +8070,7 @@ declare class Trace {
|
|
|
8002
8070
|
* @example
|
|
8003
8071
|
* await client.trace.get("traceId")
|
|
8004
8072
|
*/
|
|
8005
|
-
get(traceId: string, requestOptions?: Trace.RequestOptions): HttpResponsePromise<TraceWithFullDetails>;
|
|
8073
|
+
get(traceId: string, request?: GetTraceRequest, requestOptions?: Trace.RequestOptions): HttpResponsePromise<TraceWithFullDetails>;
|
|
8006
8074
|
private __get;
|
|
8007
8075
|
/**
|
|
8008
8076
|
* Delete a specific trace
|
|
@@ -8519,4 +8587,4 @@ interface PropagateAttributesParams {
|
|
|
8519
8587
|
declare function propagateAttributes<A extends unknown[], F extends (...args: A) => ReturnType<F>>(params: PropagateAttributesParams, fn: F): ReturnType<F>;
|
|
8520
8588
|
declare function getPropagatedAttributesFromContext(context: Context): Record<string, string | string[]>;
|
|
8521
8589
|
|
|
8522
|
-
export { AccessDeniedError, type AnnotationQueue, type AnnotationQueueAssignmentRequest, type AnnotationQueueItem, AnnotationQueueObjectType, AnnotationQueueStatus, type ApiKeyDeletionResponse, type ApiKeyList, type ApiKeyResponse, type ApiKeySummary, type AuthenticationScheme, type BaseEvent, type BasePrompt, type BaseScore, type BaseScoreV1, BlobStorageExportFrequency, BlobStorageExportMode, type BlobStorageIntegrationDeletionResponse, BlobStorageIntegrationFileType, type BlobStorageIntegrationResponse, type BlobStorageIntegrationStatusResponse, BlobStorageIntegrationType, type BlobStorageIntegrationsResponse, BlobStorageSyncStatus, type BooleanScore, type BooleanScoreV1, type BulkConfig, type CategoricalScore, type CategoricalScoreV1, type ChatMessage, ChatMessageType, type ChatMessageWithPlaceholders, type ChatPrompt, type Comment, CommentObjectType, type ConfigCategory, type CorrectionScore, type CreateAnnotationQueueAssignmentResponse, type CreateAnnotationQueueItemRequest, type CreateAnnotationQueueRequest, type CreateApiKeyRequest, type CreateBlobStorageIntegrationRequest, type CreateChatPromptRequest, CreateChatPromptType, type CreateCommentRequest, type CreateCommentResponse, type CreateDatasetItemRequest, type CreateDatasetRequest, type CreateDatasetRunItemRequest, type CreateEventBody, type CreateEventEvent, type CreateGenerationBody, type CreateGenerationEvent, type CreateModelRequest, type CreateObservationEvent, type CreateProjectRequest, type CreatePromptRequest, type CreateScoreConfigRequest, type CreateScoreValue, type CreateSpanBody, type CreateSpanEvent, type CreateTextPromptRequest, CreateTextPromptType, type CreateUserRequest, type Dataset, type DatasetItem, type DatasetRun, type DatasetRunItem, type DatasetRunWithItems, DatasetStatus, type DeleteAnnotationQueueAssignmentResponse, type DeleteAnnotationQueueItemResponse, type DeleteDatasetItemResponse, type DeleteDatasetRunResponse, type DeleteMembershipRequest, type DeletePromptRequest, type DeleteTraceResponse, type DeleteTracesRequest, type EmptyResponse, Error$1 as Error, type FilterConfig, type GetAnnotationQueueItemsRequest, type GetAnnotationQueuesRequest, type GetCommentsRequest, type GetCommentsResponse, type GetDatasetItemsRequest, type GetDatasetRunsRequest, type GetDatasetsRequest, type GetLlmConnectionsRequest, type GetMediaResponse, type GetMediaUploadUrlRequest, type GetMediaUploadUrlResponse, type GetMetricsV2Request, type GetModelsRequest, type GetObservationsV2Request, type GetPromptRequest, type GetScoreConfigsRequest, type GetScoresRequest, type GetScoresResponse, GetScoresResponseData, type GetScoresResponseDataBoolean, type GetScoresResponseDataCategorical, type GetScoresResponseDataCorrection, type GetScoresResponseDataNumeric, type GetScoresResponseTraceData, type GetSessionsRequest, type GetTracesRequest, type HealthResponse, type IngestionError, IngestionEvent, type IngestionRequest, type IngestionResponse, type IngestionSuccess, type IngestionUsage, LANGFUSE_SDK_EXPERIMENT_ENVIRONMENT, LANGFUSE_SDK_NAME, LANGFUSE_SDK_VERSION, LANGFUSE_TRACER_NAME, LangfuseAPIClient, LangfuseAPIError, LangfuseAPITimeoutError, LangfuseMedia, type LangfuseMediaParams, LangfuseOtelContextKeys, LangfuseOtelSpanAttributes, type ListDatasetRunItemsRequest, type ListPromptsMetaRequest, type ListUsersRequest, LlmAdapter, type LlmConnection, LogLevel, Logger, type LoggerConfig, type MapValue, MediaContentType, type MembershipDeletionResponse, type MembershipRequest, type MembershipResponse, MembershipRole, type MembershipsResponse, MethodNotAllowedError, type MetricsV2Response, type Model, type ModelPrice, ModelUsageUnit, NotFoundError, type NumericScore, type NumericScoreV1, type Observation, type ObservationBody, ObservationLevel, ObservationType, type ObservationV2, type ObservationsV2Meta, type ObservationsV2Response, type ObservationsView, type OpenAiCompletionUsageSchema, type OpenAiResponseUsageSchema, type OpenAiUsage, type OptionalObservationBody, type Organization, type OrganizationApiKey, type OrganizationApiKeysResponse, type OrganizationProject, type OrganizationProjectsResponse, type OtelAttribute, type OtelAttributeValue, type OtelResource, type OtelResourceSpan, type OtelScope, type OtelScopeSpan, type OtelSpan, type OtelTraceRequest, type OtelTraceResponse, type PaginatedAnnotationQueueItems, type PaginatedAnnotationQueues, type PaginatedDatasetItems, type PaginatedDatasetRunItems, type PaginatedDatasetRuns, type PaginatedDatasets, type PaginatedLlmConnections, type PaginatedModels, type PaginatedSessions, type ParsedMediaReference, type PatchMediaBody, type PlaceholderMessage, PlaceholderMessageType, type PricingTier, type PricingTierCondition, type PricingTierInput, PricingTierOperator, type Project, type ProjectDeletionResponse, type Projects$1 as Projects, Prompt, type PromptMeta, type PromptMetaListResponse, PromptType, type PropagateAttributesParams, type ResourceMeta, type ResourceType, type ResourceTypesResponse, type SchemaExtension, type SchemaResource, type SchemasResponse, type ScimEmail, type ScimFeatureSupport, type ScimName, type ScimUser, type ScimUsersListResponse, Score, type ScoreBody, type ScoreConfig, ScoreConfigDataType, type ScoreConfigs$1 as ScoreConfigs, ScoreDataType, type ScoreEvent, ScoreSource, ScoreV1$1 as ScoreV1, type SdkLogBody, type SdkLogEvent, type ServiceProviderConfig, ServiceUnavailableError, type Session, type SessionWithTraces, type Sort, type TextPrompt, type Trace$1 as Trace, type TraceBody, type TraceEvent, type TraceWithDetails, type TraceWithFullDetails, type Traces, UnauthorizedError, type UpdateAnnotationQueueItemRequest, type UpdateEventBody, type UpdateGenerationBody, type UpdateGenerationEvent, type UpdateObservationEvent, type UpdateProjectRequest, type UpdatePromptRequest, type UpdateScoreConfigRequest, type UpdateSpanBody, type UpdateSpanEvent, type UpsertLlmConnectionRequest, type Usage, type UsageDetails, type UserMeta, index$t as annotationQueues, base64Decode, base64Encode, base64ToBytes, index$s as blobStorageIntegrations, bytesToBase64, index$r as comments, index$q as commons, configureGlobalLogger, createExperimentId, createExperimentItemId, createLogger, index$p as datasetItems, index$o as datasetRunItems, index$n as datasets, generateUUID, getEnv, getGlobalLogger, getPropagatedAttributesFromContext, index$m as health, index$l as ingestion, index$h as legacy, index$g as llmConnections, LoggerSingleton as logger, index$f as media, index$e as metrics, index$d as models, index$c as observations, index$b as opentelemetry, index$a as organizations, index$9 as projects, index as promptVersion, index$8 as prompts, propagateAttributes, resetGlobalLogger, safeSetTimeout, index$7 as scim, index$6 as scoreConfigs, index$5 as scores, serializeValue, index$4 as sessions, index$3 as trace, index$1 as utils };
|
|
8590
|
+
export { AccessDeniedError, type AnnotationQueue, type AnnotationQueueAssignmentRequest, type AnnotationQueueItem, AnnotationQueueObjectType, AnnotationQueueStatus, type ApiKeyDeletionResponse, type ApiKeyList, type ApiKeyResponse, type ApiKeySummary, type AuthenticationScheme, type BaseEvent, type BasePrompt, type BaseScore, type BaseScoreV1, BlobStorageExportFrequency, BlobStorageExportMode, type BlobStorageIntegrationDeletionResponse, BlobStorageIntegrationFileType, type BlobStorageIntegrationResponse, type BlobStorageIntegrationStatusResponse, BlobStorageIntegrationType, type BlobStorageIntegrationsResponse, BlobStorageSyncStatus, type BooleanScore, type BooleanScoreV1, type BulkConfig, type CategoricalScore, type CategoricalScoreV1, type ChatMessage, ChatMessageType, type ChatMessageWithPlaceholders, type ChatPrompt, type Comment, CommentObjectType, type ConfigCategory, type CorrectionScore, type CreateAnnotationQueueAssignmentResponse, type CreateAnnotationQueueItemRequest, type CreateAnnotationQueueRequest, type CreateApiKeyRequest, type CreateBlobStorageIntegrationRequest, type CreateChatPromptRequest, CreateChatPromptType, type CreateCommentRequest, type CreateCommentResponse, type CreateDatasetItemRequest, type CreateDatasetRequest, type CreateDatasetRunItemRequest, type CreateEventBody, type CreateEventEvent, type CreateGenerationBody, type CreateGenerationEvent, type CreateModelRequest, type CreateObservationEvent, type CreateProjectRequest, type CreatePromptRequest, type CreateScoreConfigRequest, type CreateScoreValue, type CreateSpanBody, type CreateSpanEvent, type CreateTextPromptRequest, CreateTextPromptType, type CreateUserRequest, type Dataset, type DatasetItem, type DatasetRun, type DatasetRunItem, type DatasetRunWithItems, DatasetStatus, type DeleteAnnotationQueueAssignmentResponse, type DeleteAnnotationQueueItemResponse, type DeleteDatasetItemResponse, type DeleteDatasetRunResponse, type DeleteMembershipRequest, type DeletePromptRequest, type DeleteTraceResponse, type DeleteTracesRequest, type EmptyResponse, Error$1 as Error, type FilterConfig, type GetAnnotationQueueItemsRequest, type GetAnnotationQueuesRequest, type GetCommentsRequest, type GetCommentsResponse, type GetDatasetItemsRequest, type GetDatasetRunsRequest, type GetDatasetsRequest, type GetLlmConnectionsRequest, type GetMediaResponse, type GetMediaUploadUrlRequest, type GetMediaUploadUrlResponse, type GetMetricsV2Request, type GetModelsRequest, type GetObservationsV2Request, type GetPromptRequest, type GetScoreConfigsRequest, type GetScoresRequest, type GetScoresResponse, GetScoresResponseData, type GetScoresResponseDataBoolean, type GetScoresResponseDataCategorical, type GetScoresResponseDataCorrection, type GetScoresResponseDataNumeric, type GetScoresResponseDataText, type GetScoresResponseTraceData, type GetSessionsRequest, type GetTraceRequest, type GetTracesRequest, type HealthResponse, type IngestionError, IngestionEvent, type IngestionRequest, type IngestionResponse, type IngestionSuccess, type IngestionUsage, LANGFUSE_SDK_EXPERIMENT_ENVIRONMENT, LANGFUSE_SDK_NAME, LANGFUSE_SDK_VERSION, LANGFUSE_TRACER_NAME, LangfuseAPIClient, LangfuseAPIError, LangfuseAPITimeoutError, LangfuseMedia, type LangfuseMediaParams, LangfuseOtelContextKeys, LangfuseOtelSpanAttributes, type ListDatasetRunItemsRequest, type ListPromptsMetaRequest, type ListUsersRequest, LlmAdapter, type LlmConnection, LogLevel, Logger, type LoggerConfig, type MapValue, MediaContentType, type MembershipDeletionResponse, type MembershipRequest, type MembershipResponse, MembershipRole, type MembershipsResponse, MethodNotAllowedError, type MetricsV2Response, type Model, type ModelPrice, ModelUsageUnit, NotFoundError, type NumericScore, type NumericScoreV1, type Observation, type ObservationBody, ObservationLevel, ObservationType, type ObservationV2, type ObservationsV2Meta, type ObservationsV2Response, type ObservationsView, type OpenAiCompletionUsageSchema, type OpenAiResponseUsageSchema, type OpenAiUsage, type OptionalObservationBody, type Organization, type OrganizationApiKey, type OrganizationApiKeysResponse, type OrganizationProject, type OrganizationProjectsResponse, type OtelAttribute, type OtelAttributeValue, type OtelResource, type OtelResourceSpan, type OtelScope, type OtelScopeSpan, type OtelSpan, type OtelTraceRequest, type OtelTraceResponse, type PaginatedAnnotationQueueItems, type PaginatedAnnotationQueues, type PaginatedDatasetItems, type PaginatedDatasetRunItems, type PaginatedDatasetRuns, type PaginatedDatasets, type PaginatedLlmConnections, type PaginatedModels, type PaginatedSessions, type ParsedMediaReference, type PatchMediaBody, type PlaceholderMessage, PlaceholderMessageType, type PricingTier, type PricingTierCondition, type PricingTierInput, PricingTierOperator, type Project, type ProjectDeletionResponse, type Projects$1 as Projects, Prompt, type PromptMeta, type PromptMetaListResponse, PromptType, type PropagateAttributesParams, type ResourceMeta, type ResourceType, type ResourceTypesResponse, type SchemaExtension, type SchemaResource, type SchemasResponse, type ScimEmail, type ScimFeatureSupport, type ScimName, type ScimUser, type ScimUsersListResponse, Score, type ScoreBody, type ScoreConfig, ScoreConfigDataType, type ScoreConfigs$1 as ScoreConfigs, ScoreDataType, type ScoreEvent, ScoreSource, ScoreV1$1 as ScoreV1, type SdkLogBody, type SdkLogEvent, type ServiceProviderConfig, ServiceUnavailableError, type Session, type SessionWithTraces, type Sort, type TextPrompt, type TextScore, type TextScoreV1, type Trace$1 as Trace, type TraceBody, type TraceEvent, type TraceWithDetails, type TraceWithFullDetails, type Traces, UnauthorizedError, type UpdateAnnotationQueueItemRequest, type UpdateEventBody, type UpdateGenerationBody, type UpdateGenerationEvent, type UpdateObservationEvent, type UpdateProjectRequest, type UpdatePromptRequest, type UpdateScoreConfigRequest, type UpdateSpanBody, type UpdateSpanEvent, type UpsertLlmConnectionRequest, type Usage, type UsageDetails, type UserMeta, index$t as annotationQueues, base64Decode, base64Encode, base64ToBytes, index$s as blobStorageIntegrations, bytesToBase64, index$r as comments, index$q as commons, configureGlobalLogger, createExperimentId, createExperimentItemId, createLogger, index$p as datasetItems, index$o as datasetRunItems, index$n as datasets, generateUUID, getEnv, getGlobalLogger, getPropagatedAttributesFromContext, index$m as health, index$l as ingestion, index$h as legacy, index$g as llmConnections, LoggerSingleton as logger, index$f as media, index$e as metrics, index$d as models, index$c as observations, index$b as opentelemetry, index$a as organizations, index$9 as projects, index as promptVersion, index$8 as prompts, propagateAttributes, resetGlobalLogger, safeSetTimeout, index$7 as scim, index$6 as scoreConfigs, index$5 as scores, serializeValue, index$4 as sessions, index$3 as trace, index$1 as utils };
|
package/dist/index.d.ts
CHANGED
|
@@ -1003,6 +1003,15 @@ interface CategoricalScoreV1 extends BaseScoreV1 {
|
|
|
1003
1003
|
stringValue: string;
|
|
1004
1004
|
}
|
|
1005
1005
|
|
|
1006
|
+
/**
|
|
1007
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1008
|
+
*/
|
|
1009
|
+
|
|
1010
|
+
interface TextScoreV1 extends BaseScoreV1 {
|
|
1011
|
+
/** The text content of the score (1-500 characters) */
|
|
1012
|
+
stringValue: string;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1006
1015
|
/**
|
|
1007
1016
|
* This file was auto-generated by Fern from our API Definition.
|
|
1008
1017
|
*/
|
|
@@ -1016,7 +1025,10 @@ ScoreV1$1.Numeric
|
|
|
1016
1025
|
| ScoreV1$1.Categorical
|
|
1017
1026
|
/**
|
|
1018
1027
|
* Score with BOOLEAN data type */
|
|
1019
|
-
| ScoreV1$1.Boolean
|
|
1028
|
+
| ScoreV1$1.Boolean
|
|
1029
|
+
/**
|
|
1030
|
+
* Score with TEXT data type */
|
|
1031
|
+
| ScoreV1$1.Text;
|
|
1020
1032
|
declare namespace ScoreV1$1 {
|
|
1021
1033
|
interface Numeric extends NumericScoreV1 {
|
|
1022
1034
|
dataType: "NUMERIC";
|
|
@@ -1027,6 +1039,9 @@ declare namespace ScoreV1$1 {
|
|
|
1027
1039
|
interface Boolean extends BooleanScoreV1 {
|
|
1028
1040
|
dataType: "BOOLEAN";
|
|
1029
1041
|
}
|
|
1042
|
+
interface Text extends TextScoreV1 {
|
|
1043
|
+
dataType: "TEXT";
|
|
1044
|
+
}
|
|
1030
1045
|
}
|
|
1031
1046
|
|
|
1032
1047
|
/**
|
|
@@ -1104,6 +1119,15 @@ interface CorrectionScore extends BaseScore {
|
|
|
1104
1119
|
stringValue: string;
|
|
1105
1120
|
}
|
|
1106
1121
|
|
|
1122
|
+
/**
|
|
1123
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1124
|
+
*/
|
|
1125
|
+
|
|
1126
|
+
interface TextScore extends BaseScore {
|
|
1127
|
+
/** The text content of the score (1-500 characters) */
|
|
1128
|
+
stringValue: string;
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1107
1131
|
/**
|
|
1108
1132
|
* This file was auto-generated by Fern from our API Definition.
|
|
1109
1133
|
*/
|
|
@@ -1120,7 +1144,10 @@ Score.Numeric
|
|
|
1120
1144
|
| Score.Boolean
|
|
1121
1145
|
/**
|
|
1122
1146
|
* Score with CORRECTION data type */
|
|
1123
|
-
| Score.Correction
|
|
1147
|
+
| Score.Correction
|
|
1148
|
+
/**
|
|
1149
|
+
* Score with TEXT data type */
|
|
1150
|
+
| Score.Text;
|
|
1124
1151
|
declare namespace Score {
|
|
1125
1152
|
interface Numeric extends NumericScore {
|
|
1126
1153
|
dataType: "NUMERIC";
|
|
@@ -1134,13 +1161,16 @@ declare namespace Score {
|
|
|
1134
1161
|
interface Correction extends CorrectionScore {
|
|
1135
1162
|
dataType: "CORRECTION";
|
|
1136
1163
|
}
|
|
1164
|
+
interface Text extends TextScore {
|
|
1165
|
+
dataType: "TEXT";
|
|
1166
|
+
}
|
|
1137
1167
|
}
|
|
1138
1168
|
|
|
1139
1169
|
/**
|
|
1140
1170
|
* This file was auto-generated by Fern from our API Definition.
|
|
1141
1171
|
*/
|
|
1142
1172
|
/**
|
|
1143
|
-
* The value of the score. Must be passed as string for categorical scores, and numeric for boolean and numeric scores
|
|
1173
|
+
* The value of the score. Must be passed as string for categorical and text scores, and numeric for boolean and numeric scores
|
|
1144
1174
|
*/
|
|
1145
1175
|
type CreateScoreValue = number | string;
|
|
1146
1176
|
|
|
@@ -1573,22 +1603,24 @@ declare const ScoreSource: {
|
|
|
1573
1603
|
/**
|
|
1574
1604
|
* This file was auto-generated by Fern from our API Definition.
|
|
1575
1605
|
*/
|
|
1576
|
-
type ScoreConfigDataType = "NUMERIC" | "BOOLEAN" | "CATEGORICAL";
|
|
1606
|
+
type ScoreConfigDataType = "NUMERIC" | "BOOLEAN" | "CATEGORICAL" | "TEXT";
|
|
1577
1607
|
declare const ScoreConfigDataType: {
|
|
1578
1608
|
readonly Numeric: "NUMERIC";
|
|
1579
1609
|
readonly Boolean: "BOOLEAN";
|
|
1580
1610
|
readonly Categorical: "CATEGORICAL";
|
|
1611
|
+
readonly Text: "TEXT";
|
|
1581
1612
|
};
|
|
1582
1613
|
|
|
1583
1614
|
/**
|
|
1584
1615
|
* This file was auto-generated by Fern from our API Definition.
|
|
1585
1616
|
*/
|
|
1586
|
-
type ScoreDataType = "NUMERIC" | "BOOLEAN" | "CATEGORICAL" | "CORRECTION";
|
|
1617
|
+
type ScoreDataType = "NUMERIC" | "BOOLEAN" | "CATEGORICAL" | "CORRECTION" | "TEXT";
|
|
1587
1618
|
declare const ScoreDataType: {
|
|
1588
1619
|
readonly Numeric: "NUMERIC";
|
|
1589
1620
|
readonly Boolean: "BOOLEAN";
|
|
1590
1621
|
readonly Categorical: "CATEGORICAL";
|
|
1591
1622
|
readonly Correction: "CORRECTION";
|
|
1623
|
+
readonly Text: "TEXT";
|
|
1592
1624
|
};
|
|
1593
1625
|
|
|
1594
1626
|
/**
|
|
@@ -1775,13 +1807,15 @@ declare const index$q_ScoreDataType: typeof ScoreDataType;
|
|
|
1775
1807
|
declare const index$q_ScoreSource: typeof ScoreSource;
|
|
1776
1808
|
type index$q_Session = Session;
|
|
1777
1809
|
type index$q_SessionWithTraces = SessionWithTraces;
|
|
1810
|
+
type index$q_TextScore = TextScore;
|
|
1811
|
+
type index$q_TextScoreV1 = TextScoreV1;
|
|
1778
1812
|
type index$q_TraceWithDetails = TraceWithDetails;
|
|
1779
1813
|
type index$q_TraceWithFullDetails = TraceWithFullDetails;
|
|
1780
1814
|
type index$q_UnauthorizedError = UnauthorizedError;
|
|
1781
1815
|
declare const index$q_UnauthorizedError: typeof UnauthorizedError;
|
|
1782
1816
|
type index$q_Usage = Usage;
|
|
1783
1817
|
declare namespace index$q {
|
|
1784
|
-
export { index$q_AccessDeniedError as AccessDeniedError, type index$q_BaseScore as BaseScore, type index$q_BaseScoreV1 as BaseScoreV1, type index$q_BooleanScore as BooleanScore, type index$q_BooleanScoreV1 as BooleanScoreV1, type index$q_CategoricalScore as CategoricalScore, type index$q_CategoricalScoreV1 as CategoricalScoreV1, type index$q_Comment as Comment, index$q_CommentObjectType as CommentObjectType, type index$q_ConfigCategory as ConfigCategory, type index$q_CorrectionScore as CorrectionScore, type index$q_CreateScoreValue as CreateScoreValue, type index$q_Dataset as Dataset, type index$q_DatasetItem as DatasetItem, type index$q_DatasetRun as DatasetRun, type index$q_DatasetRunItem as DatasetRunItem, type index$q_DatasetRunWithItems as DatasetRunWithItems, index$q_DatasetStatus as DatasetStatus, Error$1 as Error, type index$q_MapValue as MapValue, index$q_MethodNotAllowedError as MethodNotAllowedError, type index$q_Model as Model, type index$q_ModelPrice as ModelPrice, index$q_ModelUsageUnit as ModelUsageUnit, index$q_NotFoundError as NotFoundError, type index$q_NumericScore as NumericScore, type index$q_NumericScoreV1 as NumericScoreV1, type index$q_Observation as Observation, index$q_ObservationLevel as ObservationLevel, type index$q_ObservationV2 as ObservationV2, type index$q_ObservationsView as ObservationsView, type index$q_PricingTier as PricingTier, type index$q_PricingTierCondition as PricingTierCondition, type index$q_PricingTierInput as PricingTierInput, index$q_PricingTierOperator as PricingTierOperator, index$q_Score as Score, type index$q_ScoreConfig as ScoreConfig, index$q_ScoreConfigDataType as ScoreConfigDataType, index$q_ScoreDataType as ScoreDataType, index$q_ScoreSource as ScoreSource, ScoreV1$1 as ScoreV1, type index$q_Session as Session, type index$q_SessionWithTraces as SessionWithTraces, type Trace$1 as Trace, type index$q_TraceWithDetails as TraceWithDetails, type index$q_TraceWithFullDetails as TraceWithFullDetails, index$q_UnauthorizedError as UnauthorizedError, type index$q_Usage as Usage };
|
|
1818
|
+
export { index$q_AccessDeniedError as AccessDeniedError, type index$q_BaseScore as BaseScore, type index$q_BaseScoreV1 as BaseScoreV1, type index$q_BooleanScore as BooleanScore, type index$q_BooleanScoreV1 as BooleanScoreV1, type index$q_CategoricalScore as CategoricalScore, type index$q_CategoricalScoreV1 as CategoricalScoreV1, type index$q_Comment as Comment, index$q_CommentObjectType as CommentObjectType, type index$q_ConfigCategory as ConfigCategory, type index$q_CorrectionScore as CorrectionScore, type index$q_CreateScoreValue as CreateScoreValue, type index$q_Dataset as Dataset, type index$q_DatasetItem as DatasetItem, type index$q_DatasetRun as DatasetRun, type index$q_DatasetRunItem as DatasetRunItem, type index$q_DatasetRunWithItems as DatasetRunWithItems, index$q_DatasetStatus as DatasetStatus, Error$1 as Error, type index$q_MapValue as MapValue, index$q_MethodNotAllowedError as MethodNotAllowedError, type index$q_Model as Model, type index$q_ModelPrice as ModelPrice, index$q_ModelUsageUnit as ModelUsageUnit, index$q_NotFoundError as NotFoundError, type index$q_NumericScore as NumericScore, type index$q_NumericScoreV1 as NumericScoreV1, type index$q_Observation as Observation, index$q_ObservationLevel as ObservationLevel, type index$q_ObservationV2 as ObservationV2, type index$q_ObservationsView as ObservationsView, type index$q_PricingTier as PricingTier, type index$q_PricingTierCondition as PricingTierCondition, type index$q_PricingTierInput as PricingTierInput, index$q_PricingTierOperator as PricingTierOperator, index$q_Score as Score, type index$q_ScoreConfig as ScoreConfig, index$q_ScoreConfigDataType as ScoreConfigDataType, index$q_ScoreDataType as ScoreDataType, index$q_ScoreSource as ScoreSource, ScoreV1$1 as ScoreV1, type index$q_Session as Session, type index$q_SessionWithTraces as SessionWithTraces, type index$q_TextScore as TextScore, type index$q_TextScoreV1 as TextScoreV1, type Trace$1 as Trace, type index$q_TraceWithDetails as TraceWithDetails, type index$q_TraceWithFullDetails as TraceWithFullDetails, index$q_UnauthorizedError as UnauthorizedError, type index$q_Usage as Usage };
|
|
1785
1819
|
}
|
|
1786
1820
|
|
|
1787
1821
|
/**
|
|
@@ -2337,7 +2371,7 @@ interface ScoreBody {
|
|
|
2337
2371
|
environment?: string;
|
|
2338
2372
|
/** The annotation queue referenced by the score. Indicates if score was initially created while processing annotation queue. */
|
|
2339
2373
|
queueId?: string;
|
|
2340
|
-
/** The value of the score. Must be passed as string for categorical scores, and numeric for boolean and numeric scores. Boolean score values must equal either 1 or 0 (true or false) */
|
|
2374
|
+
/** The value of the score. Must be passed as string for categorical and text scores, and numeric for boolean and numeric scores. Boolean score values must equal either 1 or 0 (true or false). Text score values must be between 1 and 500 characters. */
|
|
2341
2375
|
value: CreateScoreValue;
|
|
2342
2376
|
comment?: string;
|
|
2343
2377
|
metadata?: unknown;
|
|
@@ -2891,6 +2925,14 @@ declare namespace index$j {
|
|
|
2891
2925
|
* configId: "1234-5678-90ab-cdef",
|
|
2892
2926
|
* traceId: "cdef-1234-5678-90ab"
|
|
2893
2927
|
* }
|
|
2928
|
+
*
|
|
2929
|
+
* @example
|
|
2930
|
+
* {
|
|
2931
|
+
* name: "feedback",
|
|
2932
|
+
* value: "Great explanation of the concept",
|
|
2933
|
+
* dataType: LangfuseAPI.ScoreDataType.Text,
|
|
2934
|
+
* traceId: "cdef-1234-5678-90ab"
|
|
2935
|
+
* }
|
|
2894
2936
|
*/
|
|
2895
2937
|
interface CreateScoreRequest {
|
|
2896
2938
|
id?: string;
|
|
@@ -2899,7 +2941,7 @@ interface CreateScoreRequest {
|
|
|
2899
2941
|
observationId?: string;
|
|
2900
2942
|
datasetRunId?: string;
|
|
2901
2943
|
name: string;
|
|
2902
|
-
/** The value of the score. Must be passed as string for categorical scores, and numeric for boolean and numeric scores. Boolean score values must equal either 1 or 0 (true or false) */
|
|
2944
|
+
/** The value of the score. Must be passed as string for categorical and text scores, and numeric for boolean and numeric scores. Boolean score values must equal either 1 or 0 (true or false). Text score values must be between 1 and 500 characters. */
|
|
2903
2945
|
value: CreateScoreValue;
|
|
2904
2946
|
comment?: string;
|
|
2905
2947
|
metadata?: Record<string, unknown>;
|
|
@@ -4583,7 +4625,15 @@ interface GetScoresResponseDataCorrection extends CorrectionScore {
|
|
|
4583
4625
|
* This file was auto-generated by Fern from our API Definition.
|
|
4584
4626
|
*/
|
|
4585
4627
|
|
|
4586
|
-
|
|
4628
|
+
interface GetScoresResponseDataText extends TextScore {
|
|
4629
|
+
trace?: GetScoresResponseTraceData;
|
|
4630
|
+
}
|
|
4631
|
+
|
|
4632
|
+
/**
|
|
4633
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4634
|
+
*/
|
|
4635
|
+
|
|
4636
|
+
type GetScoresResponseData = GetScoresResponseData.Numeric | GetScoresResponseData.Categorical | GetScoresResponseData.Boolean | GetScoresResponseData.Correction | GetScoresResponseData.Text;
|
|
4587
4637
|
declare namespace GetScoresResponseData {
|
|
4588
4638
|
interface Numeric extends GetScoresResponseDataNumeric {
|
|
4589
4639
|
dataType: "NUMERIC";
|
|
@@ -4597,6 +4647,9 @@ declare namespace GetScoresResponseData {
|
|
|
4597
4647
|
interface Correction extends GetScoresResponseDataCorrection {
|
|
4598
4648
|
dataType: "CORRECTION";
|
|
4599
4649
|
}
|
|
4650
|
+
interface Text extends GetScoresResponseDataText {
|
|
4651
|
+
dataType: "TEXT";
|
|
4652
|
+
}
|
|
4600
4653
|
}
|
|
4601
4654
|
|
|
4602
4655
|
/**
|
|
@@ -4668,9 +4721,10 @@ type index$5_GetScoresResponseDataBoolean = GetScoresResponseDataBoolean;
|
|
|
4668
4721
|
type index$5_GetScoresResponseDataCategorical = GetScoresResponseDataCategorical;
|
|
4669
4722
|
type index$5_GetScoresResponseDataCorrection = GetScoresResponseDataCorrection;
|
|
4670
4723
|
type index$5_GetScoresResponseDataNumeric = GetScoresResponseDataNumeric;
|
|
4724
|
+
type index$5_GetScoresResponseDataText = GetScoresResponseDataText;
|
|
4671
4725
|
type index$5_GetScoresResponseTraceData = GetScoresResponseTraceData;
|
|
4672
4726
|
declare namespace index$5 {
|
|
4673
|
-
export { type index$5_GetScoresRequest as GetScoresRequest, type index$5_GetScoresResponse as GetScoresResponse, index$5_GetScoresResponseData as GetScoresResponseData, type index$5_GetScoresResponseDataBoolean as GetScoresResponseDataBoolean, type index$5_GetScoresResponseDataCategorical as GetScoresResponseDataCategorical, type index$5_GetScoresResponseDataCorrection as GetScoresResponseDataCorrection, type index$5_GetScoresResponseDataNumeric as GetScoresResponseDataNumeric, type index$5_GetScoresResponseTraceData as GetScoresResponseTraceData };
|
|
4727
|
+
export { type index$5_GetScoresRequest as GetScoresRequest, type index$5_GetScoresResponse as GetScoresResponse, index$5_GetScoresResponseData as GetScoresResponseData, type index$5_GetScoresResponseDataBoolean as GetScoresResponseDataBoolean, type index$5_GetScoresResponseDataCategorical as GetScoresResponseDataCategorical, type index$5_GetScoresResponseDataCorrection as GetScoresResponseDataCorrection, type index$5_GetScoresResponseDataNumeric as GetScoresResponseDataNumeric, type index$5_GetScoresResponseDataText as GetScoresResponseDataText, type index$5_GetScoresResponseTraceData as GetScoresResponseTraceData };
|
|
4674
4728
|
}
|
|
4675
4729
|
|
|
4676
4730
|
/**
|
|
@@ -4731,6 +4785,18 @@ interface Sort {
|
|
|
4731
4785
|
id: string;
|
|
4732
4786
|
}
|
|
4733
4787
|
|
|
4788
|
+
/**
|
|
4789
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4790
|
+
*/
|
|
4791
|
+
/**
|
|
4792
|
+
* @example
|
|
4793
|
+
* {}
|
|
4794
|
+
*/
|
|
4795
|
+
interface GetTraceRequest {
|
|
4796
|
+
/** Comma-separated list of fields to include in the response. Available field groups: 'core' (always included), 'io' (input, output, metadata), 'scores', 'observations', 'metrics'. If not specified, all fields are returned. Example: 'core,scores,metrics'. Note: Excluded 'observations' or 'scores' fields return empty arrays; excluded 'metrics' returns -1 for 'totalCost' and 'latency'. */
|
|
4797
|
+
fields?: string;
|
|
4798
|
+
}
|
|
4799
|
+
|
|
4734
4800
|
/**
|
|
4735
4801
|
* This file was auto-generated by Fern from our API Definition.
|
|
4736
4802
|
*/
|
|
@@ -4888,11 +4954,12 @@ interface DeleteTracesRequest {
|
|
|
4888
4954
|
|
|
4889
4955
|
type index$3_DeleteTraceResponse = DeleteTraceResponse;
|
|
4890
4956
|
type index$3_DeleteTracesRequest = DeleteTracesRequest;
|
|
4957
|
+
type index$3_GetTraceRequest = GetTraceRequest;
|
|
4891
4958
|
type index$3_GetTracesRequest = GetTracesRequest;
|
|
4892
4959
|
type index$3_Sort = Sort;
|
|
4893
4960
|
type index$3_Traces = Traces;
|
|
4894
4961
|
declare namespace index$3 {
|
|
4895
|
-
export type { index$3_DeleteTraceResponse as DeleteTraceResponse, index$3_DeleteTracesRequest as DeleteTracesRequest, index$3_GetTracesRequest as GetTracesRequest, index$3_Sort as Sort, index$3_Traces as Traces };
|
|
4962
|
+
export type { index$3_DeleteTraceResponse as DeleteTraceResponse, index$3_DeleteTracesRequest as DeleteTracesRequest, index$3_GetTraceRequest as GetTraceRequest, index$3_GetTracesRequest as GetTracesRequest, index$3_Sort as Sort, index$3_Traces as Traces };
|
|
4896
4963
|
}
|
|
4897
4964
|
|
|
4898
4965
|
/**
|
|
@@ -7991,6 +8058,7 @@ declare class Trace {
|
|
|
7991
8058
|
* Get a specific trace
|
|
7992
8059
|
*
|
|
7993
8060
|
* @param {string} traceId - The unique langfuse identifier of a trace
|
|
8061
|
+
* @param {LangfuseAPI.GetTraceRequest} request
|
|
7994
8062
|
* @param {Trace.RequestOptions} requestOptions - Request-specific configuration.
|
|
7995
8063
|
*
|
|
7996
8064
|
* @throws {@link LangfuseAPI.Error}
|
|
@@ -8002,7 +8070,7 @@ declare class Trace {
|
|
|
8002
8070
|
* @example
|
|
8003
8071
|
* await client.trace.get("traceId")
|
|
8004
8072
|
*/
|
|
8005
|
-
get(traceId: string, requestOptions?: Trace.RequestOptions): HttpResponsePromise<TraceWithFullDetails>;
|
|
8073
|
+
get(traceId: string, request?: GetTraceRequest, requestOptions?: Trace.RequestOptions): HttpResponsePromise<TraceWithFullDetails>;
|
|
8006
8074
|
private __get;
|
|
8007
8075
|
/**
|
|
8008
8076
|
* Delete a specific trace
|
|
@@ -8519,4 +8587,4 @@ interface PropagateAttributesParams {
|
|
|
8519
8587
|
declare function propagateAttributes<A extends unknown[], F extends (...args: A) => ReturnType<F>>(params: PropagateAttributesParams, fn: F): ReturnType<F>;
|
|
8520
8588
|
declare function getPropagatedAttributesFromContext(context: Context): Record<string, string | string[]>;
|
|
8521
8589
|
|
|
8522
|
-
export { AccessDeniedError, type AnnotationQueue, type AnnotationQueueAssignmentRequest, type AnnotationQueueItem, AnnotationQueueObjectType, AnnotationQueueStatus, type ApiKeyDeletionResponse, type ApiKeyList, type ApiKeyResponse, type ApiKeySummary, type AuthenticationScheme, type BaseEvent, type BasePrompt, type BaseScore, type BaseScoreV1, BlobStorageExportFrequency, BlobStorageExportMode, type BlobStorageIntegrationDeletionResponse, BlobStorageIntegrationFileType, type BlobStorageIntegrationResponse, type BlobStorageIntegrationStatusResponse, BlobStorageIntegrationType, type BlobStorageIntegrationsResponse, BlobStorageSyncStatus, type BooleanScore, type BooleanScoreV1, type BulkConfig, type CategoricalScore, type CategoricalScoreV1, type ChatMessage, ChatMessageType, type ChatMessageWithPlaceholders, type ChatPrompt, type Comment, CommentObjectType, type ConfigCategory, type CorrectionScore, type CreateAnnotationQueueAssignmentResponse, type CreateAnnotationQueueItemRequest, type CreateAnnotationQueueRequest, type CreateApiKeyRequest, type CreateBlobStorageIntegrationRequest, type CreateChatPromptRequest, CreateChatPromptType, type CreateCommentRequest, type CreateCommentResponse, type CreateDatasetItemRequest, type CreateDatasetRequest, type CreateDatasetRunItemRequest, type CreateEventBody, type CreateEventEvent, type CreateGenerationBody, type CreateGenerationEvent, type CreateModelRequest, type CreateObservationEvent, type CreateProjectRequest, type CreatePromptRequest, type CreateScoreConfigRequest, type CreateScoreValue, type CreateSpanBody, type CreateSpanEvent, type CreateTextPromptRequest, CreateTextPromptType, type CreateUserRequest, type Dataset, type DatasetItem, type DatasetRun, type DatasetRunItem, type DatasetRunWithItems, DatasetStatus, type DeleteAnnotationQueueAssignmentResponse, type DeleteAnnotationQueueItemResponse, type DeleteDatasetItemResponse, type DeleteDatasetRunResponse, type DeleteMembershipRequest, type DeletePromptRequest, type DeleteTraceResponse, type DeleteTracesRequest, type EmptyResponse, Error$1 as Error, type FilterConfig, type GetAnnotationQueueItemsRequest, type GetAnnotationQueuesRequest, type GetCommentsRequest, type GetCommentsResponse, type GetDatasetItemsRequest, type GetDatasetRunsRequest, type GetDatasetsRequest, type GetLlmConnectionsRequest, type GetMediaResponse, type GetMediaUploadUrlRequest, type GetMediaUploadUrlResponse, type GetMetricsV2Request, type GetModelsRequest, type GetObservationsV2Request, type GetPromptRequest, type GetScoreConfigsRequest, type GetScoresRequest, type GetScoresResponse, GetScoresResponseData, type GetScoresResponseDataBoolean, type GetScoresResponseDataCategorical, type GetScoresResponseDataCorrection, type GetScoresResponseDataNumeric, type GetScoresResponseTraceData, type GetSessionsRequest, type GetTracesRequest, type HealthResponse, type IngestionError, IngestionEvent, type IngestionRequest, type IngestionResponse, type IngestionSuccess, type IngestionUsage, LANGFUSE_SDK_EXPERIMENT_ENVIRONMENT, LANGFUSE_SDK_NAME, LANGFUSE_SDK_VERSION, LANGFUSE_TRACER_NAME, LangfuseAPIClient, LangfuseAPIError, LangfuseAPITimeoutError, LangfuseMedia, type LangfuseMediaParams, LangfuseOtelContextKeys, LangfuseOtelSpanAttributes, type ListDatasetRunItemsRequest, type ListPromptsMetaRequest, type ListUsersRequest, LlmAdapter, type LlmConnection, LogLevel, Logger, type LoggerConfig, type MapValue, MediaContentType, type MembershipDeletionResponse, type MembershipRequest, type MembershipResponse, MembershipRole, type MembershipsResponse, MethodNotAllowedError, type MetricsV2Response, type Model, type ModelPrice, ModelUsageUnit, NotFoundError, type NumericScore, type NumericScoreV1, type Observation, type ObservationBody, ObservationLevel, ObservationType, type ObservationV2, type ObservationsV2Meta, type ObservationsV2Response, type ObservationsView, type OpenAiCompletionUsageSchema, type OpenAiResponseUsageSchema, type OpenAiUsage, type OptionalObservationBody, type Organization, type OrganizationApiKey, type OrganizationApiKeysResponse, type OrganizationProject, type OrganizationProjectsResponse, type OtelAttribute, type OtelAttributeValue, type OtelResource, type OtelResourceSpan, type OtelScope, type OtelScopeSpan, type OtelSpan, type OtelTraceRequest, type OtelTraceResponse, type PaginatedAnnotationQueueItems, type PaginatedAnnotationQueues, type PaginatedDatasetItems, type PaginatedDatasetRunItems, type PaginatedDatasetRuns, type PaginatedDatasets, type PaginatedLlmConnections, type PaginatedModels, type PaginatedSessions, type ParsedMediaReference, type PatchMediaBody, type PlaceholderMessage, PlaceholderMessageType, type PricingTier, type PricingTierCondition, type PricingTierInput, PricingTierOperator, type Project, type ProjectDeletionResponse, type Projects$1 as Projects, Prompt, type PromptMeta, type PromptMetaListResponse, PromptType, type PropagateAttributesParams, type ResourceMeta, type ResourceType, type ResourceTypesResponse, type SchemaExtension, type SchemaResource, type SchemasResponse, type ScimEmail, type ScimFeatureSupport, type ScimName, type ScimUser, type ScimUsersListResponse, Score, type ScoreBody, type ScoreConfig, ScoreConfigDataType, type ScoreConfigs$1 as ScoreConfigs, ScoreDataType, type ScoreEvent, ScoreSource, ScoreV1$1 as ScoreV1, type SdkLogBody, type SdkLogEvent, type ServiceProviderConfig, ServiceUnavailableError, type Session, type SessionWithTraces, type Sort, type TextPrompt, type Trace$1 as Trace, type TraceBody, type TraceEvent, type TraceWithDetails, type TraceWithFullDetails, type Traces, UnauthorizedError, type UpdateAnnotationQueueItemRequest, type UpdateEventBody, type UpdateGenerationBody, type UpdateGenerationEvent, type UpdateObservationEvent, type UpdateProjectRequest, type UpdatePromptRequest, type UpdateScoreConfigRequest, type UpdateSpanBody, type UpdateSpanEvent, type UpsertLlmConnectionRequest, type Usage, type UsageDetails, type UserMeta, index$t as annotationQueues, base64Decode, base64Encode, base64ToBytes, index$s as blobStorageIntegrations, bytesToBase64, index$r as comments, index$q as commons, configureGlobalLogger, createExperimentId, createExperimentItemId, createLogger, index$p as datasetItems, index$o as datasetRunItems, index$n as datasets, generateUUID, getEnv, getGlobalLogger, getPropagatedAttributesFromContext, index$m as health, index$l as ingestion, index$h as legacy, index$g as llmConnections, LoggerSingleton as logger, index$f as media, index$e as metrics, index$d as models, index$c as observations, index$b as opentelemetry, index$a as organizations, index$9 as projects, index as promptVersion, index$8 as prompts, propagateAttributes, resetGlobalLogger, safeSetTimeout, index$7 as scim, index$6 as scoreConfigs, index$5 as scores, serializeValue, index$4 as sessions, index$3 as trace, index$1 as utils };
|
|
8590
|
+
export { AccessDeniedError, type AnnotationQueue, type AnnotationQueueAssignmentRequest, type AnnotationQueueItem, AnnotationQueueObjectType, AnnotationQueueStatus, type ApiKeyDeletionResponse, type ApiKeyList, type ApiKeyResponse, type ApiKeySummary, type AuthenticationScheme, type BaseEvent, type BasePrompt, type BaseScore, type BaseScoreV1, BlobStorageExportFrequency, BlobStorageExportMode, type BlobStorageIntegrationDeletionResponse, BlobStorageIntegrationFileType, type BlobStorageIntegrationResponse, type BlobStorageIntegrationStatusResponse, BlobStorageIntegrationType, type BlobStorageIntegrationsResponse, BlobStorageSyncStatus, type BooleanScore, type BooleanScoreV1, type BulkConfig, type CategoricalScore, type CategoricalScoreV1, type ChatMessage, ChatMessageType, type ChatMessageWithPlaceholders, type ChatPrompt, type Comment, CommentObjectType, type ConfigCategory, type CorrectionScore, type CreateAnnotationQueueAssignmentResponse, type CreateAnnotationQueueItemRequest, type CreateAnnotationQueueRequest, type CreateApiKeyRequest, type CreateBlobStorageIntegrationRequest, type CreateChatPromptRequest, CreateChatPromptType, type CreateCommentRequest, type CreateCommentResponse, type CreateDatasetItemRequest, type CreateDatasetRequest, type CreateDatasetRunItemRequest, type CreateEventBody, type CreateEventEvent, type CreateGenerationBody, type CreateGenerationEvent, type CreateModelRequest, type CreateObservationEvent, type CreateProjectRequest, type CreatePromptRequest, type CreateScoreConfigRequest, type CreateScoreValue, type CreateSpanBody, type CreateSpanEvent, type CreateTextPromptRequest, CreateTextPromptType, type CreateUserRequest, type Dataset, type DatasetItem, type DatasetRun, type DatasetRunItem, type DatasetRunWithItems, DatasetStatus, type DeleteAnnotationQueueAssignmentResponse, type DeleteAnnotationQueueItemResponse, type DeleteDatasetItemResponse, type DeleteDatasetRunResponse, type DeleteMembershipRequest, type DeletePromptRequest, type DeleteTraceResponse, type DeleteTracesRequest, type EmptyResponse, Error$1 as Error, type FilterConfig, type GetAnnotationQueueItemsRequest, type GetAnnotationQueuesRequest, type GetCommentsRequest, type GetCommentsResponse, type GetDatasetItemsRequest, type GetDatasetRunsRequest, type GetDatasetsRequest, type GetLlmConnectionsRequest, type GetMediaResponse, type GetMediaUploadUrlRequest, type GetMediaUploadUrlResponse, type GetMetricsV2Request, type GetModelsRequest, type GetObservationsV2Request, type GetPromptRequest, type GetScoreConfigsRequest, type GetScoresRequest, type GetScoresResponse, GetScoresResponseData, type GetScoresResponseDataBoolean, type GetScoresResponseDataCategorical, type GetScoresResponseDataCorrection, type GetScoresResponseDataNumeric, type GetScoresResponseDataText, type GetScoresResponseTraceData, type GetSessionsRequest, type GetTraceRequest, type GetTracesRequest, type HealthResponse, type IngestionError, IngestionEvent, type IngestionRequest, type IngestionResponse, type IngestionSuccess, type IngestionUsage, LANGFUSE_SDK_EXPERIMENT_ENVIRONMENT, LANGFUSE_SDK_NAME, LANGFUSE_SDK_VERSION, LANGFUSE_TRACER_NAME, LangfuseAPIClient, LangfuseAPIError, LangfuseAPITimeoutError, LangfuseMedia, type LangfuseMediaParams, LangfuseOtelContextKeys, LangfuseOtelSpanAttributes, type ListDatasetRunItemsRequest, type ListPromptsMetaRequest, type ListUsersRequest, LlmAdapter, type LlmConnection, LogLevel, Logger, type LoggerConfig, type MapValue, MediaContentType, type MembershipDeletionResponse, type MembershipRequest, type MembershipResponse, MembershipRole, type MembershipsResponse, MethodNotAllowedError, type MetricsV2Response, type Model, type ModelPrice, ModelUsageUnit, NotFoundError, type NumericScore, type NumericScoreV1, type Observation, type ObservationBody, ObservationLevel, ObservationType, type ObservationV2, type ObservationsV2Meta, type ObservationsV2Response, type ObservationsView, type OpenAiCompletionUsageSchema, type OpenAiResponseUsageSchema, type OpenAiUsage, type OptionalObservationBody, type Organization, type OrganizationApiKey, type OrganizationApiKeysResponse, type OrganizationProject, type OrganizationProjectsResponse, type OtelAttribute, type OtelAttributeValue, type OtelResource, type OtelResourceSpan, type OtelScope, type OtelScopeSpan, type OtelSpan, type OtelTraceRequest, type OtelTraceResponse, type PaginatedAnnotationQueueItems, type PaginatedAnnotationQueues, type PaginatedDatasetItems, type PaginatedDatasetRunItems, type PaginatedDatasetRuns, type PaginatedDatasets, type PaginatedLlmConnections, type PaginatedModels, type PaginatedSessions, type ParsedMediaReference, type PatchMediaBody, type PlaceholderMessage, PlaceholderMessageType, type PricingTier, type PricingTierCondition, type PricingTierInput, PricingTierOperator, type Project, type ProjectDeletionResponse, type Projects$1 as Projects, Prompt, type PromptMeta, type PromptMetaListResponse, PromptType, type PropagateAttributesParams, type ResourceMeta, type ResourceType, type ResourceTypesResponse, type SchemaExtension, type SchemaResource, type SchemasResponse, type ScimEmail, type ScimFeatureSupport, type ScimName, type ScimUser, type ScimUsersListResponse, Score, type ScoreBody, type ScoreConfig, ScoreConfigDataType, type ScoreConfigs$1 as ScoreConfigs, ScoreDataType, type ScoreEvent, ScoreSource, ScoreV1$1 as ScoreV1, type SdkLogBody, type SdkLogEvent, type ServiceProviderConfig, ServiceUnavailableError, type Session, type SessionWithTraces, type Sort, type TextPrompt, type TextScore, type TextScoreV1, type Trace$1 as Trace, type TraceBody, type TraceEvent, type TraceWithDetails, type TraceWithFullDetails, type Traces, UnauthorizedError, type UpdateAnnotationQueueItemRequest, type UpdateEventBody, type UpdateGenerationBody, type UpdateGenerationEvent, type UpdateObservationEvent, type UpdateProjectRequest, type UpdatePromptRequest, type UpdateScoreConfigRequest, type UpdateSpanBody, type UpdateSpanEvent, type UpsertLlmConnectionRequest, type Usage, type UsageDetails, type UserMeta, index$t as annotationQueues, base64Decode, base64Encode, base64ToBytes, index$s as blobStorageIntegrations, bytesToBase64, index$r as comments, index$q as commons, configureGlobalLogger, createExperimentId, createExperimentItemId, createLogger, index$p as datasetItems, index$o as datasetRunItems, index$n as datasets, generateUUID, getEnv, getGlobalLogger, getPropagatedAttributesFromContext, index$m as health, index$l as ingestion, index$h as legacy, index$g as llmConnections, LoggerSingleton as logger, index$f as media, index$e as metrics, index$d as models, index$c as observations, index$b as opentelemetry, index$a as organizations, index$9 as projects, index as promptVersion, index$8 as prompts, propagateAttributes, resetGlobalLogger, safeSetTimeout, index$7 as scim, index$6 as scoreConfigs, index$5 as scores, serializeValue, index$4 as sessions, index$3 as trace, index$1 as utils };
|
package/dist/index.mjs
CHANGED
|
@@ -276,7 +276,7 @@ var resetGlobalLogger = () => {
|
|
|
276
276
|
// package.json
|
|
277
277
|
var package_default = {
|
|
278
278
|
name: "@langfuse/core",
|
|
279
|
-
version: "5.0
|
|
279
|
+
version: "5.1.0",
|
|
280
280
|
description: "Core functions and utilities for Langfuse packages",
|
|
281
281
|
type: "module",
|
|
282
282
|
sideEffects: false,
|
|
@@ -502,7 +502,8 @@ var ScoreSource = {
|
|
|
502
502
|
var ScoreConfigDataType = {
|
|
503
503
|
Numeric: "NUMERIC",
|
|
504
504
|
Boolean: "BOOLEAN",
|
|
505
|
-
Categorical: "CATEGORICAL"
|
|
505
|
+
Categorical: "CATEGORICAL",
|
|
506
|
+
Text: "TEXT"
|
|
506
507
|
};
|
|
507
508
|
|
|
508
509
|
// src/api/api/resources/commons/types/ScoreDataType.ts
|
|
@@ -510,7 +511,8 @@ var ScoreDataType = {
|
|
|
510
511
|
Numeric: "NUMERIC",
|
|
511
512
|
Boolean: "BOOLEAN",
|
|
512
513
|
Categorical: "CATEGORICAL",
|
|
513
|
-
Correction: "CORRECTION"
|
|
514
|
+
Correction: "CORRECTION",
|
|
515
|
+
Text: "TEXT"
|
|
514
516
|
};
|
|
515
517
|
|
|
516
518
|
// src/api/core/json.ts
|
|
@@ -11554,6 +11556,7 @@ var Trace = class {
|
|
|
11554
11556
|
* Get a specific trace
|
|
11555
11557
|
*
|
|
11556
11558
|
* @param {string} traceId - The unique langfuse identifier of a trace
|
|
11559
|
+
* @param {LangfuseAPI.GetTraceRequest} request
|
|
11557
11560
|
* @param {Trace.RequestOptions} requestOptions - Request-specific configuration.
|
|
11558
11561
|
*
|
|
11559
11562
|
* @throws {@link LangfuseAPI.Error}
|
|
@@ -11565,13 +11568,18 @@ var Trace = class {
|
|
|
11565
11568
|
* @example
|
|
11566
11569
|
* await client.trace.get("traceId")
|
|
11567
11570
|
*/
|
|
11568
|
-
get(traceId, requestOptions) {
|
|
11571
|
+
get(traceId, request = {}, requestOptions) {
|
|
11569
11572
|
return HttpResponsePromise.fromPromise(
|
|
11570
|
-
this.__get(traceId, requestOptions)
|
|
11573
|
+
this.__get(traceId, request, requestOptions)
|
|
11571
11574
|
);
|
|
11572
11575
|
}
|
|
11573
|
-
async __get(traceId, requestOptions) {
|
|
11576
|
+
async __get(traceId, request = {}, requestOptions) {
|
|
11574
11577
|
var _a2, _b, _c, _d, _e, _f, _g, _h;
|
|
11578
|
+
const { fields } = request;
|
|
11579
|
+
const _queryParams = {};
|
|
11580
|
+
if (fields != null) {
|
|
11581
|
+
_queryParams["fields"] = fields;
|
|
11582
|
+
}
|
|
11575
11583
|
let _headers = mergeHeaders(
|
|
11576
11584
|
(_a2 = this._options) == null ? void 0 : _a2.headers,
|
|
11577
11585
|
mergeOnlyDefinedHeaders({
|
|
@@ -11589,7 +11597,7 @@ var Trace = class {
|
|
|
11589
11597
|
),
|
|
11590
11598
|
method: "GET",
|
|
11591
11599
|
headers: _headers,
|
|
11592
|
-
queryParameters: requestOptions == null ? void 0 : requestOptions.queryParams,
|
|
11600
|
+
queryParameters: { ..._queryParams, ...requestOptions == null ? void 0 : requestOptions.queryParams },
|
|
11593
11601
|
timeoutMs: (requestOptions == null ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1e3 : 6e4,
|
|
11594
11602
|
maxRetries: requestOptions == null ? void 0 : requestOptions.maxRetries,
|
|
11595
11603
|
abortSignal: requestOptions == null ? void 0 : requestOptions.abortSignal
|