@langfuse/core 5.0.0-beta.0 → 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 +6 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +91 -6
- package/dist/index.d.ts +91 -6
- package/dist/index.mjs +6 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -756,6 +756,85 @@ interface ObservationsView extends Observation {
|
|
|
756
756
|
timeToFirstToken: number | null;
|
|
757
757
|
}
|
|
758
758
|
|
|
759
|
+
/**
|
|
760
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
761
|
+
*/
|
|
762
|
+
|
|
763
|
+
/**
|
|
764
|
+
* An observation from the v2 API with field-group-based selection.
|
|
765
|
+
* Core fields are always present. Other fields are included only when their field group is requested.
|
|
766
|
+
*/
|
|
767
|
+
interface ObservationV2 {
|
|
768
|
+
/** The unique identifier of the observation */
|
|
769
|
+
id: string;
|
|
770
|
+
/** The trace ID associated with the observation */
|
|
771
|
+
traceId: string | null;
|
|
772
|
+
/** The start time of the observation */
|
|
773
|
+
startTime: string;
|
|
774
|
+
/** The end time of the observation */
|
|
775
|
+
endTime: string | null;
|
|
776
|
+
/** The project ID this observation belongs to */
|
|
777
|
+
projectId: string;
|
|
778
|
+
/** The parent observation ID */
|
|
779
|
+
parentObservationId: string | null;
|
|
780
|
+
/** The type of the observation (e.g. GENERATION, SPAN, EVENT) */
|
|
781
|
+
type: string;
|
|
782
|
+
/** The name of the observation */
|
|
783
|
+
name?: string | null;
|
|
784
|
+
/** The level of the observation */
|
|
785
|
+
level?: ObservationLevel;
|
|
786
|
+
/** The status message of the observation */
|
|
787
|
+
statusMessage?: string | null;
|
|
788
|
+
/** The version of the observation */
|
|
789
|
+
version?: string | null;
|
|
790
|
+
/** The environment from which this observation originated */
|
|
791
|
+
environment?: string | null;
|
|
792
|
+
/** Whether the observation is bookmarked */
|
|
793
|
+
bookmarked?: boolean;
|
|
794
|
+
/** Whether the observation is public */
|
|
795
|
+
public?: boolean;
|
|
796
|
+
/** The user ID associated with the observation */
|
|
797
|
+
userId?: string | null;
|
|
798
|
+
/** The session ID associated with the observation */
|
|
799
|
+
sessionId?: string | null;
|
|
800
|
+
/** The completion start time of the observation */
|
|
801
|
+
completionStartTime?: string | null;
|
|
802
|
+
/** The creation timestamp of the observation */
|
|
803
|
+
createdAt?: string;
|
|
804
|
+
/** The last update timestamp of the observation */
|
|
805
|
+
updatedAt?: string;
|
|
806
|
+
/** The input data of the observation */
|
|
807
|
+
input?: unknown;
|
|
808
|
+
/** The output data of the observation */
|
|
809
|
+
output?: unknown;
|
|
810
|
+
/** Additional metadata of the observation */
|
|
811
|
+
metadata?: unknown;
|
|
812
|
+
/** The model name as provided by the user */
|
|
813
|
+
providedModelName?: string | null;
|
|
814
|
+
/** The internal model ID matched by Langfuse */
|
|
815
|
+
internalModelId?: string | null;
|
|
816
|
+
/** The parameters of the model used for the observation */
|
|
817
|
+
modelParameters?: unknown;
|
|
818
|
+
/** The usage details of the observation. Key is the usage metric name, value is the number of units consumed. */
|
|
819
|
+
usageDetails?: Record<string, number>;
|
|
820
|
+
/** The cost details of the observation. Key is the cost metric name, value is the cost in USD. */
|
|
821
|
+
costDetails?: Record<string, number>;
|
|
822
|
+
/** The total cost of the observation in USD */
|
|
823
|
+
totalCost?: number | null;
|
|
824
|
+
/** The prompt ID associated with the observation */
|
|
825
|
+
promptId?: string | null;
|
|
826
|
+
/** The prompt name associated with the observation */
|
|
827
|
+
promptName?: string | null;
|
|
828
|
+
/** The prompt version associated with the observation */
|
|
829
|
+
promptVersion?: number | null;
|
|
830
|
+
/** The latency in seconds */
|
|
831
|
+
latency?: number | null;
|
|
832
|
+
/** The time to first token in seconds */
|
|
833
|
+
timeToFirstToken?: number | null;
|
|
834
|
+
/** The matched model ID */
|
|
835
|
+
modelId?: string | null;
|
|
836
|
+
}
|
|
837
|
+
|
|
759
838
|
/**
|
|
760
839
|
* This file was auto-generated by Fern from our API Definition.
|
|
761
840
|
*/
|
|
@@ -1631,6 +1710,7 @@ type index$p_NumericScore = NumericScore;
|
|
|
1631
1710
|
type index$p_NumericScoreV1 = NumericScoreV1;
|
|
1632
1711
|
type index$p_Observation = Observation;
|
|
1633
1712
|
declare const index$p_ObservationLevel: typeof ObservationLevel;
|
|
1713
|
+
type index$p_ObservationV2 = ObservationV2;
|
|
1634
1714
|
type index$p_ObservationsView = ObservationsView;
|
|
1635
1715
|
type index$p_PricingTier = PricingTier;
|
|
1636
1716
|
type index$p_PricingTierCondition = PricingTierCondition;
|
|
@@ -1649,7 +1729,7 @@ type index$p_UnauthorizedError = UnauthorizedError;
|
|
|
1649
1729
|
declare const index$p_UnauthorizedError: typeof UnauthorizedError;
|
|
1650
1730
|
type index$p_Usage = Usage;
|
|
1651
1731
|
declare namespace index$p {
|
|
1652
|
-
export { index$p_AccessDeniedError as AccessDeniedError, type index$p_BaseScore as BaseScore, type index$p_BaseScoreV1 as BaseScoreV1, type index$p_BooleanScore as BooleanScore, type index$p_BooleanScoreV1 as BooleanScoreV1, type index$p_CategoricalScore as CategoricalScore, type index$p_CategoricalScoreV1 as CategoricalScoreV1, type index$p_Comment as Comment, index$p_CommentObjectType as CommentObjectType, type index$p_ConfigCategory as ConfigCategory, type index$p_CorrectionScore as CorrectionScore, type index$p_CreateScoreValue as CreateScoreValue, type index$p_Dataset as Dataset, type index$p_DatasetItem as DatasetItem, type index$p_DatasetRun as DatasetRun, type index$p_DatasetRunItem as DatasetRunItem, type index$p_DatasetRunWithItems as DatasetRunWithItems, index$p_DatasetStatus as DatasetStatus, Error$1 as Error, type index$p_MapValue as MapValue, index$p_MethodNotAllowedError as MethodNotAllowedError, type index$p_Model as Model, type index$p_ModelPrice as ModelPrice, index$p_ModelUsageUnit as ModelUsageUnit, index$p_NotFoundError as NotFoundError, type index$p_NumericScore as NumericScore, type index$p_NumericScoreV1 as NumericScoreV1, type index$p_Observation as Observation, index$p_ObservationLevel as ObservationLevel, type index$p_ObservationsView as ObservationsView, type index$p_PricingTier as PricingTier, type index$p_PricingTierCondition as PricingTierCondition, type index$p_PricingTierInput as PricingTierInput, index$p_PricingTierOperator as PricingTierOperator, Score$1 as Score, type index$p_ScoreConfig as ScoreConfig, index$p_ScoreConfigDataType as ScoreConfigDataType, index$p_ScoreDataType as ScoreDataType, index$p_ScoreSource as ScoreSource, index$p_ScoreV1 as ScoreV1, type index$p_Session as Session, type index$p_SessionWithTraces as SessionWithTraces, type Trace$1 as Trace, type index$p_TraceWithDetails as TraceWithDetails, type index$p_TraceWithFullDetails as TraceWithFullDetails, index$p_UnauthorizedError as UnauthorizedError, type index$p_Usage as Usage };
|
|
1732
|
+
export { index$p_AccessDeniedError as AccessDeniedError, type index$p_BaseScore as BaseScore, type index$p_BaseScoreV1 as BaseScoreV1, type index$p_BooleanScore as BooleanScore, type index$p_BooleanScoreV1 as BooleanScoreV1, type index$p_CategoricalScore as CategoricalScore, type index$p_CategoricalScoreV1 as CategoricalScoreV1, type index$p_Comment as Comment, index$p_CommentObjectType as CommentObjectType, type index$p_ConfigCategory as ConfigCategory, type index$p_CorrectionScore as CorrectionScore, type index$p_CreateScoreValue as CreateScoreValue, type index$p_Dataset as Dataset, type index$p_DatasetItem as DatasetItem, type index$p_DatasetRun as DatasetRun, type index$p_DatasetRunItem as DatasetRunItem, type index$p_DatasetRunWithItems as DatasetRunWithItems, index$p_DatasetStatus as DatasetStatus, Error$1 as Error, type index$p_MapValue as MapValue, index$p_MethodNotAllowedError as MethodNotAllowedError, type index$p_Model as Model, type index$p_ModelPrice as ModelPrice, index$p_ModelUsageUnit as ModelUsageUnit, index$p_NotFoundError as NotFoundError, type index$p_NumericScore as NumericScore, type index$p_NumericScoreV1 as NumericScoreV1, type index$p_Observation as Observation, index$p_ObservationLevel as ObservationLevel, type index$p_ObservationV2 as ObservationV2, type index$p_ObservationsView as ObservationsView, type index$p_PricingTier as PricingTier, type index$p_PricingTierCondition as PricingTierCondition, type index$p_PricingTierInput as PricingTierInput, index$p_PricingTierOperator as PricingTierOperator, Score$1 as Score, type index$p_ScoreConfig as ScoreConfig, index$p_ScoreConfigDataType as ScoreConfigDataType, index$p_ScoreDataType as ScoreDataType, index$p_ScoreSource as ScoreSource, index$p_ScoreV1 as ScoreV1, type index$p_Session as Session, type index$p_SessionWithTraces as SessionWithTraces, type Trace$1 as Trace, type index$p_TraceWithDetails as TraceWithDetails, type index$p_TraceWithFullDetails as TraceWithFullDetails, index$p_UnauthorizedError as UnauthorizedError, type index$p_Usage as Usage };
|
|
1653
1733
|
}
|
|
1654
1734
|
|
|
1655
1735
|
/**
|
|
@@ -2944,7 +3024,7 @@ declare namespace index$f {
|
|
|
2944
3024
|
*/
|
|
2945
3025
|
interface ObservationsV2Response {
|
|
2946
3026
|
/** Array of observation objects. Fields included depend on the `fields` parameter in the request. */
|
|
2947
|
-
data:
|
|
3027
|
+
data: ObservationV2[];
|
|
2948
3028
|
meta: ObservationsV2Meta;
|
|
2949
3029
|
}
|
|
2950
3030
|
|
|
@@ -2987,8 +3067,9 @@ interface GetObservationsV2Request {
|
|
|
2987
3067
|
/** Base64-encoded cursor for pagination. Use the cursor from the previous response to get the next page. */
|
|
2988
3068
|
cursor?: string;
|
|
2989
3069
|
/**
|
|
2990
|
-
*
|
|
2991
|
-
*
|
|
3070
|
+
* **Deprecated.** Setting this to `true` will return a 400 error.
|
|
3071
|
+
* Input/output fields are always returned as raw strings.
|
|
3072
|
+
* Remove this parameter or set it to `false`.
|
|
2992
3073
|
*/
|
|
2993
3074
|
parseIoAsJson?: boolean;
|
|
2994
3075
|
name?: string;
|
|
@@ -4297,6 +4378,8 @@ interface GetScoresResponseTraceData {
|
|
|
4297
4378
|
tags?: string[];
|
|
4298
4379
|
/** The environment of the trace referenced by score */
|
|
4299
4380
|
environment?: string;
|
|
4381
|
+
/** The session ID associated with the trace referenced by score */
|
|
4382
|
+
sessionId?: string;
|
|
4300
4383
|
}
|
|
4301
4384
|
|
|
4302
4385
|
/**
|
|
@@ -4407,8 +4490,10 @@ interface GetScoresRequest {
|
|
|
4407
4490
|
dataType?: ScoreDataType;
|
|
4408
4491
|
/** Only scores linked to traces that include all of these tags will be returned. */
|
|
4409
4492
|
traceTags?: string | string[];
|
|
4410
|
-
/** Comma-separated list of field groups to include in the response. Available field groups: 'score' (core score fields), 'trace' (trace properties: userId, tags, environment). If not specified, both 'score' and 'trace' are returned by default. Example: 'score' to exclude trace data, 'score,trace' to include both. Note: When filtering by trace properties (using userId or traceTags parameters), the 'trace' field group must be included, otherwise a 400 error will be returned. */
|
|
4493
|
+
/** Comma-separated list of field groups to include in the response. Available field groups: 'score' (core score fields), 'trace' (trace properties: userId, tags, environment, sessionId). If not specified, both 'score' and 'trace' are returned by default. Example: 'score' to exclude trace data, 'score,trace' to include both. Note: When filtering by trace properties (using userId or traceTags parameters), the 'trace' field group must be included, otherwise a 400 error will be returned. */
|
|
4411
4494
|
fields?: string;
|
|
4495
|
+
/** A JSON stringified array of filter objects. Each object requires type, column, operator, and value. Supports filtering by score metadata using the stringObject type. Example: [{"type":"stringObject","column":"metadata","key":"user_id","operator":"=","value":"abc123"}]. Supported types: stringObject (metadata key-value filtering), string, number, datetime, stringOptions, arrayOptions. Supported operators for stringObject: =, contains, does not contain, starts with, ends with. */
|
|
4496
|
+
filter?: string;
|
|
4412
4497
|
}
|
|
4413
4498
|
|
|
4414
4499
|
type index$6_GetScoresRequest = GetScoresRequest;
|
|
@@ -8321,4 +8406,4 @@ interface PropagateAttributesParams {
|
|
|
8321
8406
|
declare function propagateAttributes<A extends unknown[], F extends (...args: A) => ReturnType<F>>(params: PropagateAttributesParams, fn: F): ReturnType<F>;
|
|
8322
8407
|
declare function getPropagatedAttributesFromContext(context: Context): Record<string, string | string[]>;
|
|
8323
8408
|
|
|
8324
|
-
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, BlobStorageIntegrationType, type BlobStorageIntegrationsResponse, 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 CreateScoreRequest, type CreateScoreResponse, 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 GetMetricsRequest, type GetMetricsV2Request, type GetModelsRequest, type GetObservationsRequest, 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 MetricsResponse, type MetricsV2Response, type Model, type ModelPrice, ModelUsageUnit, NotFoundError, type NumericScore, type NumericScoreV1, type Observation, type ObservationBody, ObservationLevel, ObservationType, type Observations$1 as Observations, type ObservationsV2Meta, type ObservationsV2Response, type ObservationsView, type ObservationsViews, 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$1 as Score, type ScoreBody, type ScoreConfig, ScoreConfigDataType, type ScoreConfigs$1 as ScoreConfigs, ScoreDataType, type ScoreEvent, ScoreSource, 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$s as annotationQueues, base64Decode, base64Encode, base64ToBytes, index$r as blobStorageIntegrations, bytesToBase64, index$q as comments, index$p as commons, configureGlobalLogger, createExperimentId, createExperimentItemId, createLogger, index$o as datasetItems, index$n as datasetRunItems, index$m as datasets, generateUUID, getEnv, getGlobalLogger, getPropagatedAttributesFromContext, index$l as health, index$k as ingestion, index$j as llmConnections, LoggerSingleton as logger, index$i as media, index$g as metrics, index$h as metricsV2, index$f as models, index$d as observations, index$e as observationsV2, index$c as opentelemetry, index$b as organizations, index$a as projects, index as promptVersion, index$9 as prompts, propagateAttributes, resetGlobalLogger, safeSetTimeout, index$8 as scim, index$5 as score, index$7 as scoreConfigs, index$6 as scoreV2, serializeValue, index$4 as sessions, index$3 as trace, index$1 as utils };
|
|
8409
|
+
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, BlobStorageIntegrationType, type BlobStorageIntegrationsResponse, 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 CreateScoreRequest, type CreateScoreResponse, 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 GetMetricsRequest, type GetMetricsV2Request, type GetModelsRequest, type GetObservationsRequest, 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 MetricsResponse, type MetricsV2Response, type Model, type ModelPrice, ModelUsageUnit, NotFoundError, type NumericScore, type NumericScoreV1, type Observation, type ObservationBody, ObservationLevel, ObservationType, type ObservationV2, type Observations$1 as Observations, type ObservationsV2Meta, type ObservationsV2Response, type ObservationsView, type ObservationsViews, 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$1 as Score, type ScoreBody, type ScoreConfig, ScoreConfigDataType, type ScoreConfigs$1 as ScoreConfigs, ScoreDataType, type ScoreEvent, ScoreSource, 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$s as annotationQueues, base64Decode, base64Encode, base64ToBytes, index$r as blobStorageIntegrations, bytesToBase64, index$q as comments, index$p as commons, configureGlobalLogger, createExperimentId, createExperimentItemId, createLogger, index$o as datasetItems, index$n as datasetRunItems, index$m as datasets, generateUUID, getEnv, getGlobalLogger, getPropagatedAttributesFromContext, index$l as health, index$k as ingestion, index$j as llmConnections, LoggerSingleton as logger, index$i as media, index$g as metrics, index$h as metricsV2, index$f as models, index$d as observations, index$e as observationsV2, index$c as opentelemetry, index$b as organizations, index$a as projects, index as promptVersion, index$9 as prompts, propagateAttributes, resetGlobalLogger, safeSetTimeout, index$8 as scim, index$5 as score, index$7 as scoreConfigs, index$6 as scoreV2, serializeValue, index$4 as sessions, index$3 as trace, index$1 as utils };
|
package/dist/index.d.ts
CHANGED
|
@@ -756,6 +756,85 @@ interface ObservationsView extends Observation {
|
|
|
756
756
|
timeToFirstToken: number | null;
|
|
757
757
|
}
|
|
758
758
|
|
|
759
|
+
/**
|
|
760
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
761
|
+
*/
|
|
762
|
+
|
|
763
|
+
/**
|
|
764
|
+
* An observation from the v2 API with field-group-based selection.
|
|
765
|
+
* Core fields are always present. Other fields are included only when their field group is requested.
|
|
766
|
+
*/
|
|
767
|
+
interface ObservationV2 {
|
|
768
|
+
/** The unique identifier of the observation */
|
|
769
|
+
id: string;
|
|
770
|
+
/** The trace ID associated with the observation */
|
|
771
|
+
traceId: string | null;
|
|
772
|
+
/** The start time of the observation */
|
|
773
|
+
startTime: string;
|
|
774
|
+
/** The end time of the observation */
|
|
775
|
+
endTime: string | null;
|
|
776
|
+
/** The project ID this observation belongs to */
|
|
777
|
+
projectId: string;
|
|
778
|
+
/** The parent observation ID */
|
|
779
|
+
parentObservationId: string | null;
|
|
780
|
+
/** The type of the observation (e.g. GENERATION, SPAN, EVENT) */
|
|
781
|
+
type: string;
|
|
782
|
+
/** The name of the observation */
|
|
783
|
+
name?: string | null;
|
|
784
|
+
/** The level of the observation */
|
|
785
|
+
level?: ObservationLevel;
|
|
786
|
+
/** The status message of the observation */
|
|
787
|
+
statusMessage?: string | null;
|
|
788
|
+
/** The version of the observation */
|
|
789
|
+
version?: string | null;
|
|
790
|
+
/** The environment from which this observation originated */
|
|
791
|
+
environment?: string | null;
|
|
792
|
+
/** Whether the observation is bookmarked */
|
|
793
|
+
bookmarked?: boolean;
|
|
794
|
+
/** Whether the observation is public */
|
|
795
|
+
public?: boolean;
|
|
796
|
+
/** The user ID associated with the observation */
|
|
797
|
+
userId?: string | null;
|
|
798
|
+
/** The session ID associated with the observation */
|
|
799
|
+
sessionId?: string | null;
|
|
800
|
+
/** The completion start time of the observation */
|
|
801
|
+
completionStartTime?: string | null;
|
|
802
|
+
/** The creation timestamp of the observation */
|
|
803
|
+
createdAt?: string;
|
|
804
|
+
/** The last update timestamp of the observation */
|
|
805
|
+
updatedAt?: string;
|
|
806
|
+
/** The input data of the observation */
|
|
807
|
+
input?: unknown;
|
|
808
|
+
/** The output data of the observation */
|
|
809
|
+
output?: unknown;
|
|
810
|
+
/** Additional metadata of the observation */
|
|
811
|
+
metadata?: unknown;
|
|
812
|
+
/** The model name as provided by the user */
|
|
813
|
+
providedModelName?: string | null;
|
|
814
|
+
/** The internal model ID matched by Langfuse */
|
|
815
|
+
internalModelId?: string | null;
|
|
816
|
+
/** The parameters of the model used for the observation */
|
|
817
|
+
modelParameters?: unknown;
|
|
818
|
+
/** The usage details of the observation. Key is the usage metric name, value is the number of units consumed. */
|
|
819
|
+
usageDetails?: Record<string, number>;
|
|
820
|
+
/** The cost details of the observation. Key is the cost metric name, value is the cost in USD. */
|
|
821
|
+
costDetails?: Record<string, number>;
|
|
822
|
+
/** The total cost of the observation in USD */
|
|
823
|
+
totalCost?: number | null;
|
|
824
|
+
/** The prompt ID associated with the observation */
|
|
825
|
+
promptId?: string | null;
|
|
826
|
+
/** The prompt name associated with the observation */
|
|
827
|
+
promptName?: string | null;
|
|
828
|
+
/** The prompt version associated with the observation */
|
|
829
|
+
promptVersion?: number | null;
|
|
830
|
+
/** The latency in seconds */
|
|
831
|
+
latency?: number | null;
|
|
832
|
+
/** The time to first token in seconds */
|
|
833
|
+
timeToFirstToken?: number | null;
|
|
834
|
+
/** The matched model ID */
|
|
835
|
+
modelId?: string | null;
|
|
836
|
+
}
|
|
837
|
+
|
|
759
838
|
/**
|
|
760
839
|
* This file was auto-generated by Fern from our API Definition.
|
|
761
840
|
*/
|
|
@@ -1631,6 +1710,7 @@ type index$p_NumericScore = NumericScore;
|
|
|
1631
1710
|
type index$p_NumericScoreV1 = NumericScoreV1;
|
|
1632
1711
|
type index$p_Observation = Observation;
|
|
1633
1712
|
declare const index$p_ObservationLevel: typeof ObservationLevel;
|
|
1713
|
+
type index$p_ObservationV2 = ObservationV2;
|
|
1634
1714
|
type index$p_ObservationsView = ObservationsView;
|
|
1635
1715
|
type index$p_PricingTier = PricingTier;
|
|
1636
1716
|
type index$p_PricingTierCondition = PricingTierCondition;
|
|
@@ -1649,7 +1729,7 @@ type index$p_UnauthorizedError = UnauthorizedError;
|
|
|
1649
1729
|
declare const index$p_UnauthorizedError: typeof UnauthorizedError;
|
|
1650
1730
|
type index$p_Usage = Usage;
|
|
1651
1731
|
declare namespace index$p {
|
|
1652
|
-
export { index$p_AccessDeniedError as AccessDeniedError, type index$p_BaseScore as BaseScore, type index$p_BaseScoreV1 as BaseScoreV1, type index$p_BooleanScore as BooleanScore, type index$p_BooleanScoreV1 as BooleanScoreV1, type index$p_CategoricalScore as CategoricalScore, type index$p_CategoricalScoreV1 as CategoricalScoreV1, type index$p_Comment as Comment, index$p_CommentObjectType as CommentObjectType, type index$p_ConfigCategory as ConfigCategory, type index$p_CorrectionScore as CorrectionScore, type index$p_CreateScoreValue as CreateScoreValue, type index$p_Dataset as Dataset, type index$p_DatasetItem as DatasetItem, type index$p_DatasetRun as DatasetRun, type index$p_DatasetRunItem as DatasetRunItem, type index$p_DatasetRunWithItems as DatasetRunWithItems, index$p_DatasetStatus as DatasetStatus, Error$1 as Error, type index$p_MapValue as MapValue, index$p_MethodNotAllowedError as MethodNotAllowedError, type index$p_Model as Model, type index$p_ModelPrice as ModelPrice, index$p_ModelUsageUnit as ModelUsageUnit, index$p_NotFoundError as NotFoundError, type index$p_NumericScore as NumericScore, type index$p_NumericScoreV1 as NumericScoreV1, type index$p_Observation as Observation, index$p_ObservationLevel as ObservationLevel, type index$p_ObservationsView as ObservationsView, type index$p_PricingTier as PricingTier, type index$p_PricingTierCondition as PricingTierCondition, type index$p_PricingTierInput as PricingTierInput, index$p_PricingTierOperator as PricingTierOperator, Score$1 as Score, type index$p_ScoreConfig as ScoreConfig, index$p_ScoreConfigDataType as ScoreConfigDataType, index$p_ScoreDataType as ScoreDataType, index$p_ScoreSource as ScoreSource, index$p_ScoreV1 as ScoreV1, type index$p_Session as Session, type index$p_SessionWithTraces as SessionWithTraces, type Trace$1 as Trace, type index$p_TraceWithDetails as TraceWithDetails, type index$p_TraceWithFullDetails as TraceWithFullDetails, index$p_UnauthorizedError as UnauthorizedError, type index$p_Usage as Usage };
|
|
1732
|
+
export { index$p_AccessDeniedError as AccessDeniedError, type index$p_BaseScore as BaseScore, type index$p_BaseScoreV1 as BaseScoreV1, type index$p_BooleanScore as BooleanScore, type index$p_BooleanScoreV1 as BooleanScoreV1, type index$p_CategoricalScore as CategoricalScore, type index$p_CategoricalScoreV1 as CategoricalScoreV1, type index$p_Comment as Comment, index$p_CommentObjectType as CommentObjectType, type index$p_ConfigCategory as ConfigCategory, type index$p_CorrectionScore as CorrectionScore, type index$p_CreateScoreValue as CreateScoreValue, type index$p_Dataset as Dataset, type index$p_DatasetItem as DatasetItem, type index$p_DatasetRun as DatasetRun, type index$p_DatasetRunItem as DatasetRunItem, type index$p_DatasetRunWithItems as DatasetRunWithItems, index$p_DatasetStatus as DatasetStatus, Error$1 as Error, type index$p_MapValue as MapValue, index$p_MethodNotAllowedError as MethodNotAllowedError, type index$p_Model as Model, type index$p_ModelPrice as ModelPrice, index$p_ModelUsageUnit as ModelUsageUnit, index$p_NotFoundError as NotFoundError, type index$p_NumericScore as NumericScore, type index$p_NumericScoreV1 as NumericScoreV1, type index$p_Observation as Observation, index$p_ObservationLevel as ObservationLevel, type index$p_ObservationV2 as ObservationV2, type index$p_ObservationsView as ObservationsView, type index$p_PricingTier as PricingTier, type index$p_PricingTierCondition as PricingTierCondition, type index$p_PricingTierInput as PricingTierInput, index$p_PricingTierOperator as PricingTierOperator, Score$1 as Score, type index$p_ScoreConfig as ScoreConfig, index$p_ScoreConfigDataType as ScoreConfigDataType, index$p_ScoreDataType as ScoreDataType, index$p_ScoreSource as ScoreSource, index$p_ScoreV1 as ScoreV1, type index$p_Session as Session, type index$p_SessionWithTraces as SessionWithTraces, type Trace$1 as Trace, type index$p_TraceWithDetails as TraceWithDetails, type index$p_TraceWithFullDetails as TraceWithFullDetails, index$p_UnauthorizedError as UnauthorizedError, type index$p_Usage as Usage };
|
|
1653
1733
|
}
|
|
1654
1734
|
|
|
1655
1735
|
/**
|
|
@@ -2944,7 +3024,7 @@ declare namespace index$f {
|
|
|
2944
3024
|
*/
|
|
2945
3025
|
interface ObservationsV2Response {
|
|
2946
3026
|
/** Array of observation objects. Fields included depend on the `fields` parameter in the request. */
|
|
2947
|
-
data:
|
|
3027
|
+
data: ObservationV2[];
|
|
2948
3028
|
meta: ObservationsV2Meta;
|
|
2949
3029
|
}
|
|
2950
3030
|
|
|
@@ -2987,8 +3067,9 @@ interface GetObservationsV2Request {
|
|
|
2987
3067
|
/** Base64-encoded cursor for pagination. Use the cursor from the previous response to get the next page. */
|
|
2988
3068
|
cursor?: string;
|
|
2989
3069
|
/**
|
|
2990
|
-
*
|
|
2991
|
-
*
|
|
3070
|
+
* **Deprecated.** Setting this to `true` will return a 400 error.
|
|
3071
|
+
* Input/output fields are always returned as raw strings.
|
|
3072
|
+
* Remove this parameter or set it to `false`.
|
|
2992
3073
|
*/
|
|
2993
3074
|
parseIoAsJson?: boolean;
|
|
2994
3075
|
name?: string;
|
|
@@ -4297,6 +4378,8 @@ interface GetScoresResponseTraceData {
|
|
|
4297
4378
|
tags?: string[];
|
|
4298
4379
|
/** The environment of the trace referenced by score */
|
|
4299
4380
|
environment?: string;
|
|
4381
|
+
/** The session ID associated with the trace referenced by score */
|
|
4382
|
+
sessionId?: string;
|
|
4300
4383
|
}
|
|
4301
4384
|
|
|
4302
4385
|
/**
|
|
@@ -4407,8 +4490,10 @@ interface GetScoresRequest {
|
|
|
4407
4490
|
dataType?: ScoreDataType;
|
|
4408
4491
|
/** Only scores linked to traces that include all of these tags will be returned. */
|
|
4409
4492
|
traceTags?: string | string[];
|
|
4410
|
-
/** Comma-separated list of field groups to include in the response. Available field groups: 'score' (core score fields), 'trace' (trace properties: userId, tags, environment). If not specified, both 'score' and 'trace' are returned by default. Example: 'score' to exclude trace data, 'score,trace' to include both. Note: When filtering by trace properties (using userId or traceTags parameters), the 'trace' field group must be included, otherwise a 400 error will be returned. */
|
|
4493
|
+
/** Comma-separated list of field groups to include in the response. Available field groups: 'score' (core score fields), 'trace' (trace properties: userId, tags, environment, sessionId). If not specified, both 'score' and 'trace' are returned by default. Example: 'score' to exclude trace data, 'score,trace' to include both. Note: When filtering by trace properties (using userId or traceTags parameters), the 'trace' field group must be included, otherwise a 400 error will be returned. */
|
|
4411
4494
|
fields?: string;
|
|
4495
|
+
/** A JSON stringified array of filter objects. Each object requires type, column, operator, and value. Supports filtering by score metadata using the stringObject type. Example: [{"type":"stringObject","column":"metadata","key":"user_id","operator":"=","value":"abc123"}]. Supported types: stringObject (metadata key-value filtering), string, number, datetime, stringOptions, arrayOptions. Supported operators for stringObject: =, contains, does not contain, starts with, ends with. */
|
|
4496
|
+
filter?: string;
|
|
4412
4497
|
}
|
|
4413
4498
|
|
|
4414
4499
|
type index$6_GetScoresRequest = GetScoresRequest;
|
|
@@ -8321,4 +8406,4 @@ interface PropagateAttributesParams {
|
|
|
8321
8406
|
declare function propagateAttributes<A extends unknown[], F extends (...args: A) => ReturnType<F>>(params: PropagateAttributesParams, fn: F): ReturnType<F>;
|
|
8322
8407
|
declare function getPropagatedAttributesFromContext(context: Context): Record<string, string | string[]>;
|
|
8323
8408
|
|
|
8324
|
-
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, BlobStorageIntegrationType, type BlobStorageIntegrationsResponse, 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 CreateScoreRequest, type CreateScoreResponse, 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 GetMetricsRequest, type GetMetricsV2Request, type GetModelsRequest, type GetObservationsRequest, 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 MetricsResponse, type MetricsV2Response, type Model, type ModelPrice, ModelUsageUnit, NotFoundError, type NumericScore, type NumericScoreV1, type Observation, type ObservationBody, ObservationLevel, ObservationType, type Observations$1 as Observations, type ObservationsV2Meta, type ObservationsV2Response, type ObservationsView, type ObservationsViews, 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$1 as Score, type ScoreBody, type ScoreConfig, ScoreConfigDataType, type ScoreConfigs$1 as ScoreConfigs, ScoreDataType, type ScoreEvent, ScoreSource, 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$s as annotationQueues, base64Decode, base64Encode, base64ToBytes, index$r as blobStorageIntegrations, bytesToBase64, index$q as comments, index$p as commons, configureGlobalLogger, createExperimentId, createExperimentItemId, createLogger, index$o as datasetItems, index$n as datasetRunItems, index$m as datasets, generateUUID, getEnv, getGlobalLogger, getPropagatedAttributesFromContext, index$l as health, index$k as ingestion, index$j as llmConnections, LoggerSingleton as logger, index$i as media, index$g as metrics, index$h as metricsV2, index$f as models, index$d as observations, index$e as observationsV2, index$c as opentelemetry, index$b as organizations, index$a as projects, index as promptVersion, index$9 as prompts, propagateAttributes, resetGlobalLogger, safeSetTimeout, index$8 as scim, index$5 as score, index$7 as scoreConfigs, index$6 as scoreV2, serializeValue, index$4 as sessions, index$3 as trace, index$1 as utils };
|
|
8409
|
+
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, BlobStorageIntegrationType, type BlobStorageIntegrationsResponse, 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 CreateScoreRequest, type CreateScoreResponse, 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 GetMetricsRequest, type GetMetricsV2Request, type GetModelsRequest, type GetObservationsRequest, 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 MetricsResponse, type MetricsV2Response, type Model, type ModelPrice, ModelUsageUnit, NotFoundError, type NumericScore, type NumericScoreV1, type Observation, type ObservationBody, ObservationLevel, ObservationType, type ObservationV2, type Observations$1 as Observations, type ObservationsV2Meta, type ObservationsV2Response, type ObservationsView, type ObservationsViews, 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$1 as Score, type ScoreBody, type ScoreConfig, ScoreConfigDataType, type ScoreConfigs$1 as ScoreConfigs, ScoreDataType, type ScoreEvent, ScoreSource, 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$s as annotationQueues, base64Decode, base64Encode, base64ToBytes, index$r as blobStorageIntegrations, bytesToBase64, index$q as comments, index$p as commons, configureGlobalLogger, createExperimentId, createExperimentItemId, createLogger, index$o as datasetItems, index$n as datasetRunItems, index$m as datasets, generateUUID, getEnv, getGlobalLogger, getPropagatedAttributesFromContext, index$l as health, index$k as ingestion, index$j as llmConnections, LoggerSingleton as logger, index$i as media, index$g as metrics, index$h as metricsV2, index$f as models, index$d as observations, index$e as observationsV2, index$c as opentelemetry, index$b as organizations, index$a as projects, index as promptVersion, index$9 as prompts, propagateAttributes, resetGlobalLogger, safeSetTimeout, index$8 as scim, index$5 as score, index$7 as scoreConfigs, index$6 as scoreV2, serializeValue, index$4 as sessions, index$3 as trace, index$1 as utils };
|
package/dist/index.mjs
CHANGED
|
@@ -273,7 +273,7 @@ var resetGlobalLogger = () => {
|
|
|
273
273
|
// package.json
|
|
274
274
|
var package_default = {
|
|
275
275
|
name: "@langfuse/core",
|
|
276
|
-
version: "
|
|
276
|
+
version: "5.0.0-beta.0",
|
|
277
277
|
description: "Core functions and utilities for Langfuse packages",
|
|
278
278
|
type: "module",
|
|
279
279
|
sideEffects: false,
|
|
@@ -10642,7 +10642,8 @@ var ScoreV2 = class {
|
|
|
10642
10642
|
queueId,
|
|
10643
10643
|
dataType,
|
|
10644
10644
|
traceTags,
|
|
10645
|
-
fields
|
|
10645
|
+
fields,
|
|
10646
|
+
filter
|
|
10646
10647
|
} = request;
|
|
10647
10648
|
const _queryParams = {};
|
|
10648
10649
|
if (page != null) {
|
|
@@ -10713,6 +10714,9 @@ var ScoreV2 = class {
|
|
|
10713
10714
|
if (fields != null) {
|
|
10714
10715
|
_queryParams["fields"] = fields;
|
|
10715
10716
|
}
|
|
10717
|
+
if (filter != null) {
|
|
10718
|
+
_queryParams["filter"] = filter;
|
|
10719
|
+
}
|
|
10716
10720
|
let _headers = mergeHeaders(
|
|
10717
10721
|
(_a2 = this._options) == null ? void 0 : _a2.headers,
|
|
10718
10722
|
mergeOnlyDefinedHeaders({
|