@langfuse/core 4.6.1 → 5.0.0-beta.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 +41 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +56 -29
- package/dist/index.d.ts +56 -29
- package/dist/index.mjs +37 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1407,7 +1407,7 @@ declare const ObservationLevel: {
|
|
|
1407
1407
|
/**
|
|
1408
1408
|
* This file was auto-generated by Fern from our API Definition.
|
|
1409
1409
|
*/
|
|
1410
|
-
type MapValue = string | undefined | number | undefined | boolean | undefined | string[] | undefined;
|
|
1410
|
+
type MapValue = string | undefined | number | undefined | number | undefined | boolean | undefined | string[] | undefined;
|
|
1411
1411
|
|
|
1412
1412
|
/**
|
|
1413
1413
|
* This file was auto-generated by Fern from our API Definition.
|
|
@@ -3757,15 +3757,7 @@ interface PromptMeta {
|
|
|
3757
3757
|
* This file was auto-generated by Fern from our API Definition.
|
|
3758
3758
|
*/
|
|
3759
3759
|
|
|
3760
|
-
type CreatePromptRequest =
|
|
3761
|
-
declare namespace CreatePromptRequest {
|
|
3762
|
-
interface Chat extends CreateChatPromptRequest {
|
|
3763
|
-
type: "chat";
|
|
3764
|
-
}
|
|
3765
|
-
interface Text extends CreateTextPromptRequest {
|
|
3766
|
-
type: "text";
|
|
3767
|
-
}
|
|
3768
|
-
}
|
|
3760
|
+
type CreatePromptRequest = CreateChatPromptRequest | CreateTextPromptRequest;
|
|
3769
3761
|
|
|
3770
3762
|
/**
|
|
3771
3763
|
* This file was auto-generated by Fern from our API Definition.
|
|
@@ -3775,6 +3767,7 @@ interface CreateChatPromptRequest {
|
|
|
3775
3767
|
name: string;
|
|
3776
3768
|
prompt: ChatMessageWithPlaceholders[];
|
|
3777
3769
|
config?: unknown;
|
|
3770
|
+
type: CreateChatPromptType;
|
|
3778
3771
|
/** List of deployment labels of this prompt version. */
|
|
3779
3772
|
labels?: string[];
|
|
3780
3773
|
/** List of tags to apply to all versions of this prompt. */
|
|
@@ -3786,10 +3779,12 @@ interface CreateChatPromptRequest {
|
|
|
3786
3779
|
/**
|
|
3787
3780
|
* This file was auto-generated by Fern from our API Definition.
|
|
3788
3781
|
*/
|
|
3782
|
+
|
|
3789
3783
|
interface CreateTextPromptRequest {
|
|
3790
3784
|
name: string;
|
|
3791
3785
|
prompt: string;
|
|
3792
3786
|
config?: unknown;
|
|
3787
|
+
type?: CreateTextPromptType;
|
|
3793
3788
|
/** List of deployment labels of this prompt version. */
|
|
3794
3789
|
labels?: string[];
|
|
3795
3790
|
/** List of tags to apply to all versions of this prompt. */
|
|
@@ -3842,31 +3837,43 @@ interface BasePrompt {
|
|
|
3842
3837
|
* This file was auto-generated by Fern from our API Definition.
|
|
3843
3838
|
*/
|
|
3844
3839
|
|
|
3845
|
-
type ChatMessageWithPlaceholders =
|
|
3846
|
-
declare namespace ChatMessageWithPlaceholders {
|
|
3847
|
-
interface Chatmessage extends ChatMessage {
|
|
3848
|
-
type: "chatmessage";
|
|
3849
|
-
}
|
|
3850
|
-
interface Placeholder extends PlaceholderMessage {
|
|
3851
|
-
type: "placeholder";
|
|
3852
|
-
}
|
|
3853
|
-
}
|
|
3840
|
+
type ChatMessageWithPlaceholders = ChatMessage | PlaceholderMessage;
|
|
3854
3841
|
|
|
3855
3842
|
/**
|
|
3856
3843
|
* This file was auto-generated by Fern from our API Definition.
|
|
3857
3844
|
*/
|
|
3845
|
+
|
|
3858
3846
|
interface ChatMessage {
|
|
3859
3847
|
role: string;
|
|
3860
3848
|
content: string;
|
|
3849
|
+
type?: ChatMessageType;
|
|
3861
3850
|
}
|
|
3862
3851
|
|
|
3863
3852
|
/**
|
|
3864
3853
|
* This file was auto-generated by Fern from our API Definition.
|
|
3865
3854
|
*/
|
|
3855
|
+
type ChatMessageType = "chatmessage";
|
|
3856
|
+
declare const ChatMessageType: {
|
|
3857
|
+
readonly Chatmessage: "chatmessage";
|
|
3858
|
+
};
|
|
3859
|
+
|
|
3860
|
+
/**
|
|
3861
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3862
|
+
*/
|
|
3863
|
+
|
|
3866
3864
|
interface PlaceholderMessage {
|
|
3867
3865
|
name: string;
|
|
3866
|
+
type?: PlaceholderMessageType;
|
|
3868
3867
|
}
|
|
3869
3868
|
|
|
3869
|
+
/**
|
|
3870
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3871
|
+
*/
|
|
3872
|
+
type PlaceholderMessageType = "placeholder";
|
|
3873
|
+
declare const PlaceholderMessageType: {
|
|
3874
|
+
readonly Placeholder: "placeholder";
|
|
3875
|
+
};
|
|
3876
|
+
|
|
3870
3877
|
/**
|
|
3871
3878
|
* This file was auto-generated by Fern from our API Definition.
|
|
3872
3879
|
*/
|
|
@@ -3883,6 +3890,22 @@ interface ChatPrompt extends BasePrompt {
|
|
|
3883
3890
|
prompt: ChatMessageWithPlaceholders[];
|
|
3884
3891
|
}
|
|
3885
3892
|
|
|
3893
|
+
/**
|
|
3894
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3895
|
+
*/
|
|
3896
|
+
type CreateChatPromptType = "chat";
|
|
3897
|
+
declare const CreateChatPromptType: {
|
|
3898
|
+
readonly Chat: "chat";
|
|
3899
|
+
};
|
|
3900
|
+
|
|
3901
|
+
/**
|
|
3902
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3903
|
+
*/
|
|
3904
|
+
type CreateTextPromptType = "text";
|
|
3905
|
+
declare const CreateTextPromptType: {
|
|
3906
|
+
readonly Text: "text";
|
|
3907
|
+
};
|
|
3908
|
+
|
|
3886
3909
|
/**
|
|
3887
3910
|
* This file was auto-generated by Fern from our API Definition.
|
|
3888
3911
|
*/
|
|
@@ -3934,22 +3957,26 @@ interface DeletePromptRequest {
|
|
|
3934
3957
|
|
|
3935
3958
|
type index$9_BasePrompt = BasePrompt;
|
|
3936
3959
|
type index$9_ChatMessage = ChatMessage;
|
|
3937
|
-
declare const index$
|
|
3960
|
+
declare const index$9_ChatMessageType: typeof ChatMessageType;
|
|
3961
|
+
type index$9_ChatMessageWithPlaceholders = ChatMessageWithPlaceholders;
|
|
3938
3962
|
type index$9_ChatPrompt = ChatPrompt;
|
|
3939
3963
|
type index$9_CreateChatPromptRequest = CreateChatPromptRequest;
|
|
3940
|
-
declare const index$
|
|
3964
|
+
declare const index$9_CreateChatPromptType: typeof CreateChatPromptType;
|
|
3965
|
+
type index$9_CreatePromptRequest = CreatePromptRequest;
|
|
3941
3966
|
type index$9_CreateTextPromptRequest = CreateTextPromptRequest;
|
|
3967
|
+
declare const index$9_CreateTextPromptType: typeof CreateTextPromptType;
|
|
3942
3968
|
type index$9_DeletePromptRequest = DeletePromptRequest;
|
|
3943
3969
|
type index$9_GetPromptRequest = GetPromptRequest;
|
|
3944
3970
|
type index$9_ListPromptsMetaRequest = ListPromptsMetaRequest;
|
|
3945
3971
|
type index$9_PlaceholderMessage = PlaceholderMessage;
|
|
3972
|
+
declare const index$9_PlaceholderMessageType: typeof PlaceholderMessageType;
|
|
3946
3973
|
declare const index$9_Prompt: typeof Prompt;
|
|
3947
3974
|
type index$9_PromptMeta = PromptMeta;
|
|
3948
3975
|
type index$9_PromptMetaListResponse = PromptMetaListResponse;
|
|
3949
3976
|
declare const index$9_PromptType: typeof PromptType;
|
|
3950
3977
|
type index$9_TextPrompt = TextPrompt;
|
|
3951
3978
|
declare namespace index$9 {
|
|
3952
|
-
export { type index$9_BasePrompt as BasePrompt, type index$9_ChatMessage as ChatMessage, index$9_ChatMessageWithPlaceholders as ChatMessageWithPlaceholders, type index$9_ChatPrompt as ChatPrompt, type index$9_CreateChatPromptRequest as CreateChatPromptRequest, index$9_CreatePromptRequest as CreatePromptRequest, type index$9_CreateTextPromptRequest as CreateTextPromptRequest, type index$9_DeletePromptRequest as DeletePromptRequest, type index$9_GetPromptRequest as GetPromptRequest, type index$9_ListPromptsMetaRequest as ListPromptsMetaRequest, type index$9_PlaceholderMessage as PlaceholderMessage, index$9_Prompt as Prompt, type index$9_PromptMeta as PromptMeta, type index$9_PromptMetaListResponse as PromptMetaListResponse, index$9_PromptType as PromptType, type index$9_TextPrompt as TextPrompt };
|
|
3979
|
+
export { type index$9_BasePrompt as BasePrompt, type index$9_ChatMessage as ChatMessage, index$9_ChatMessageType as ChatMessageType, type index$9_ChatMessageWithPlaceholders as ChatMessageWithPlaceholders, type index$9_ChatPrompt as ChatPrompt, type index$9_CreateChatPromptRequest as CreateChatPromptRequest, index$9_CreateChatPromptType as CreateChatPromptType, type index$9_CreatePromptRequest as CreatePromptRequest, type index$9_CreateTextPromptRequest as CreateTextPromptRequest, index$9_CreateTextPromptType as CreateTextPromptType, type index$9_DeletePromptRequest as DeletePromptRequest, type index$9_GetPromptRequest as GetPromptRequest, type index$9_ListPromptsMetaRequest as ListPromptsMetaRequest, type index$9_PlaceholderMessage as PlaceholderMessage, index$9_PlaceholderMessageType as PlaceholderMessageType, index$9_Prompt as Prompt, type index$9_PromptMeta as PromptMeta, type index$9_PromptMetaListResponse as PromptMetaListResponse, index$9_PromptType as PromptType, type index$9_TextPrompt as TextPrompt };
|
|
3953
3980
|
}
|
|
3954
3981
|
|
|
3955
3982
|
/**
|
|
@@ -7128,18 +7155,18 @@ declare class Prompts {
|
|
|
7128
7155
|
*
|
|
7129
7156
|
* @example
|
|
7130
7157
|
* await client.prompts.create({
|
|
7131
|
-
* type: "chat",
|
|
7132
7158
|
* name: "name",
|
|
7133
7159
|
* prompt: [{
|
|
7134
|
-
* type: "chatmessage",
|
|
7135
7160
|
* role: "role",
|
|
7136
|
-
* content: "content"
|
|
7161
|
+
* content: "content",
|
|
7162
|
+
* type: undefined
|
|
7137
7163
|
* }, {
|
|
7138
|
-
* type: "chatmessage",
|
|
7139
7164
|
* role: "role",
|
|
7140
|
-
* content: "content"
|
|
7165
|
+
* content: "content",
|
|
7166
|
+
* type: undefined
|
|
7141
7167
|
* }],
|
|
7142
7168
|
* config: undefined,
|
|
7169
|
+
* type: "chat",
|
|
7143
7170
|
* labels: undefined,
|
|
7144
7171
|
* tags: undefined,
|
|
7145
7172
|
* commitMessage: undefined
|
|
@@ -7927,7 +7954,7 @@ declare class LangfuseAPIClient {
|
|
|
7927
7954
|
get trace(): Trace;
|
|
7928
7955
|
}
|
|
7929
7956
|
|
|
7930
|
-
type LangfuseEnvVar = "LANGFUSE_PUBLIC_KEY" | "LANGFUSE_SECRET_KEY" | "LANGFUSE_BASE_URL" | "LANGFUSE_BASEURL" | "LANGFUSE_TIMEOUT" | "LANGFUSE_FLUSH_AT" | "LANGFUSE_FLUSH_INTERVAL" | "LANGFUSE_LOG_LEVEL" | "LANGFUSE_RELEASE" | "LANGFUSE_TRACING_ENVIRONMENT";
|
|
7957
|
+
type LangfuseEnvVar = "LANGFUSE_PUBLIC_KEY" | "LANGFUSE_SECRET_KEY" | "LANGFUSE_BASE_URL" | "LANGFUSE_BASEURL" | "LANGFUSE_TIMEOUT" | "LANGFUSE_FLUSH_AT" | "LANGFUSE_FLUSH_INTERVAL" | "LANGFUSE_LOG_LEVEL" | "LANGFUSE_DEBUG" | "LANGFUSE_RELEASE" | "LANGFUSE_TRACING_ENVIRONMENT";
|
|
7931
7958
|
declare function getEnv(key: LangfuseEnvVar): string | undefined;
|
|
7932
7959
|
declare function generateUUID(globalThis?: any): string;
|
|
7933
7960
|
declare function safeSetTimeout(fn: () => void, timeout: number): any;
|
|
@@ -8294,4 +8321,4 @@ interface PropagateAttributesParams {
|
|
|
8294
8321
|
declare function propagateAttributes<A extends unknown[], F extends (...args: A) => ReturnType<F>>(params: PropagateAttributesParams, fn: F): ReturnType<F>;
|
|
8295
8322
|
declare function getPropagatedAttributesFromContext(context: Context): Record<string, string | string[]>;
|
|
8296
8323
|
|
|
8297
|
-
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, ChatMessageWithPlaceholders, type ChatPrompt, type Comment, CommentObjectType, type ConfigCategory, type CorrectionScore, type CreateAnnotationQueueAssignmentResponse, type CreateAnnotationQueueItemRequest, type CreateAnnotationQueueRequest, type CreateApiKeyRequest, type CreateBlobStorageIntegrationRequest, type CreateChatPromptRequest, type CreateCommentRequest, type CreateCommentResponse, type CreateDatasetItemRequest, type CreateDatasetRequest, type CreateDatasetRunItemRequest, type CreateEventBody, type CreateEventEvent, type CreateGenerationBody, type CreateGenerationEvent, type CreateModelRequest, type CreateObservationEvent, type CreateProjectRequest, CreatePromptRequest, type CreateScoreConfigRequest, type CreateScoreRequest, type CreateScoreResponse, type CreateScoreValue, type CreateSpanBody, type CreateSpanEvent, type CreateTextPromptRequest, 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, 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 };
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1407,7 +1407,7 @@ declare const ObservationLevel: {
|
|
|
1407
1407
|
/**
|
|
1408
1408
|
* This file was auto-generated by Fern from our API Definition.
|
|
1409
1409
|
*/
|
|
1410
|
-
type MapValue = string | undefined | number | undefined | boolean | undefined | string[] | undefined;
|
|
1410
|
+
type MapValue = string | undefined | number | undefined | number | undefined | boolean | undefined | string[] | undefined;
|
|
1411
1411
|
|
|
1412
1412
|
/**
|
|
1413
1413
|
* This file was auto-generated by Fern from our API Definition.
|
|
@@ -3757,15 +3757,7 @@ interface PromptMeta {
|
|
|
3757
3757
|
* This file was auto-generated by Fern from our API Definition.
|
|
3758
3758
|
*/
|
|
3759
3759
|
|
|
3760
|
-
type CreatePromptRequest =
|
|
3761
|
-
declare namespace CreatePromptRequest {
|
|
3762
|
-
interface Chat extends CreateChatPromptRequest {
|
|
3763
|
-
type: "chat";
|
|
3764
|
-
}
|
|
3765
|
-
interface Text extends CreateTextPromptRequest {
|
|
3766
|
-
type: "text";
|
|
3767
|
-
}
|
|
3768
|
-
}
|
|
3760
|
+
type CreatePromptRequest = CreateChatPromptRequest | CreateTextPromptRequest;
|
|
3769
3761
|
|
|
3770
3762
|
/**
|
|
3771
3763
|
* This file was auto-generated by Fern from our API Definition.
|
|
@@ -3775,6 +3767,7 @@ interface CreateChatPromptRequest {
|
|
|
3775
3767
|
name: string;
|
|
3776
3768
|
prompt: ChatMessageWithPlaceholders[];
|
|
3777
3769
|
config?: unknown;
|
|
3770
|
+
type: CreateChatPromptType;
|
|
3778
3771
|
/** List of deployment labels of this prompt version. */
|
|
3779
3772
|
labels?: string[];
|
|
3780
3773
|
/** List of tags to apply to all versions of this prompt. */
|
|
@@ -3786,10 +3779,12 @@ interface CreateChatPromptRequest {
|
|
|
3786
3779
|
/**
|
|
3787
3780
|
* This file was auto-generated by Fern from our API Definition.
|
|
3788
3781
|
*/
|
|
3782
|
+
|
|
3789
3783
|
interface CreateTextPromptRequest {
|
|
3790
3784
|
name: string;
|
|
3791
3785
|
prompt: string;
|
|
3792
3786
|
config?: unknown;
|
|
3787
|
+
type?: CreateTextPromptType;
|
|
3793
3788
|
/** List of deployment labels of this prompt version. */
|
|
3794
3789
|
labels?: string[];
|
|
3795
3790
|
/** List of tags to apply to all versions of this prompt. */
|
|
@@ -3842,31 +3837,43 @@ interface BasePrompt {
|
|
|
3842
3837
|
* This file was auto-generated by Fern from our API Definition.
|
|
3843
3838
|
*/
|
|
3844
3839
|
|
|
3845
|
-
type ChatMessageWithPlaceholders =
|
|
3846
|
-
declare namespace ChatMessageWithPlaceholders {
|
|
3847
|
-
interface Chatmessage extends ChatMessage {
|
|
3848
|
-
type: "chatmessage";
|
|
3849
|
-
}
|
|
3850
|
-
interface Placeholder extends PlaceholderMessage {
|
|
3851
|
-
type: "placeholder";
|
|
3852
|
-
}
|
|
3853
|
-
}
|
|
3840
|
+
type ChatMessageWithPlaceholders = ChatMessage | PlaceholderMessage;
|
|
3854
3841
|
|
|
3855
3842
|
/**
|
|
3856
3843
|
* This file was auto-generated by Fern from our API Definition.
|
|
3857
3844
|
*/
|
|
3845
|
+
|
|
3858
3846
|
interface ChatMessage {
|
|
3859
3847
|
role: string;
|
|
3860
3848
|
content: string;
|
|
3849
|
+
type?: ChatMessageType;
|
|
3861
3850
|
}
|
|
3862
3851
|
|
|
3863
3852
|
/**
|
|
3864
3853
|
* This file was auto-generated by Fern from our API Definition.
|
|
3865
3854
|
*/
|
|
3855
|
+
type ChatMessageType = "chatmessage";
|
|
3856
|
+
declare const ChatMessageType: {
|
|
3857
|
+
readonly Chatmessage: "chatmessage";
|
|
3858
|
+
};
|
|
3859
|
+
|
|
3860
|
+
/**
|
|
3861
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3862
|
+
*/
|
|
3863
|
+
|
|
3866
3864
|
interface PlaceholderMessage {
|
|
3867
3865
|
name: string;
|
|
3866
|
+
type?: PlaceholderMessageType;
|
|
3868
3867
|
}
|
|
3869
3868
|
|
|
3869
|
+
/**
|
|
3870
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3871
|
+
*/
|
|
3872
|
+
type PlaceholderMessageType = "placeholder";
|
|
3873
|
+
declare const PlaceholderMessageType: {
|
|
3874
|
+
readonly Placeholder: "placeholder";
|
|
3875
|
+
};
|
|
3876
|
+
|
|
3870
3877
|
/**
|
|
3871
3878
|
* This file was auto-generated by Fern from our API Definition.
|
|
3872
3879
|
*/
|
|
@@ -3883,6 +3890,22 @@ interface ChatPrompt extends BasePrompt {
|
|
|
3883
3890
|
prompt: ChatMessageWithPlaceholders[];
|
|
3884
3891
|
}
|
|
3885
3892
|
|
|
3893
|
+
/**
|
|
3894
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3895
|
+
*/
|
|
3896
|
+
type CreateChatPromptType = "chat";
|
|
3897
|
+
declare const CreateChatPromptType: {
|
|
3898
|
+
readonly Chat: "chat";
|
|
3899
|
+
};
|
|
3900
|
+
|
|
3901
|
+
/**
|
|
3902
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3903
|
+
*/
|
|
3904
|
+
type CreateTextPromptType = "text";
|
|
3905
|
+
declare const CreateTextPromptType: {
|
|
3906
|
+
readonly Text: "text";
|
|
3907
|
+
};
|
|
3908
|
+
|
|
3886
3909
|
/**
|
|
3887
3910
|
* This file was auto-generated by Fern from our API Definition.
|
|
3888
3911
|
*/
|
|
@@ -3934,22 +3957,26 @@ interface DeletePromptRequest {
|
|
|
3934
3957
|
|
|
3935
3958
|
type index$9_BasePrompt = BasePrompt;
|
|
3936
3959
|
type index$9_ChatMessage = ChatMessage;
|
|
3937
|
-
declare const index$
|
|
3960
|
+
declare const index$9_ChatMessageType: typeof ChatMessageType;
|
|
3961
|
+
type index$9_ChatMessageWithPlaceholders = ChatMessageWithPlaceholders;
|
|
3938
3962
|
type index$9_ChatPrompt = ChatPrompt;
|
|
3939
3963
|
type index$9_CreateChatPromptRequest = CreateChatPromptRequest;
|
|
3940
|
-
declare const index$
|
|
3964
|
+
declare const index$9_CreateChatPromptType: typeof CreateChatPromptType;
|
|
3965
|
+
type index$9_CreatePromptRequest = CreatePromptRequest;
|
|
3941
3966
|
type index$9_CreateTextPromptRequest = CreateTextPromptRequest;
|
|
3967
|
+
declare const index$9_CreateTextPromptType: typeof CreateTextPromptType;
|
|
3942
3968
|
type index$9_DeletePromptRequest = DeletePromptRequest;
|
|
3943
3969
|
type index$9_GetPromptRequest = GetPromptRequest;
|
|
3944
3970
|
type index$9_ListPromptsMetaRequest = ListPromptsMetaRequest;
|
|
3945
3971
|
type index$9_PlaceholderMessage = PlaceholderMessage;
|
|
3972
|
+
declare const index$9_PlaceholderMessageType: typeof PlaceholderMessageType;
|
|
3946
3973
|
declare const index$9_Prompt: typeof Prompt;
|
|
3947
3974
|
type index$9_PromptMeta = PromptMeta;
|
|
3948
3975
|
type index$9_PromptMetaListResponse = PromptMetaListResponse;
|
|
3949
3976
|
declare const index$9_PromptType: typeof PromptType;
|
|
3950
3977
|
type index$9_TextPrompt = TextPrompt;
|
|
3951
3978
|
declare namespace index$9 {
|
|
3952
|
-
export { type index$9_BasePrompt as BasePrompt, type index$9_ChatMessage as ChatMessage, index$9_ChatMessageWithPlaceholders as ChatMessageWithPlaceholders, type index$9_ChatPrompt as ChatPrompt, type index$9_CreateChatPromptRequest as CreateChatPromptRequest, index$9_CreatePromptRequest as CreatePromptRequest, type index$9_CreateTextPromptRequest as CreateTextPromptRequest, type index$9_DeletePromptRequest as DeletePromptRequest, type index$9_GetPromptRequest as GetPromptRequest, type index$9_ListPromptsMetaRequest as ListPromptsMetaRequest, type index$9_PlaceholderMessage as PlaceholderMessage, index$9_Prompt as Prompt, type index$9_PromptMeta as PromptMeta, type index$9_PromptMetaListResponse as PromptMetaListResponse, index$9_PromptType as PromptType, type index$9_TextPrompt as TextPrompt };
|
|
3979
|
+
export { type index$9_BasePrompt as BasePrompt, type index$9_ChatMessage as ChatMessage, index$9_ChatMessageType as ChatMessageType, type index$9_ChatMessageWithPlaceholders as ChatMessageWithPlaceholders, type index$9_ChatPrompt as ChatPrompt, type index$9_CreateChatPromptRequest as CreateChatPromptRequest, index$9_CreateChatPromptType as CreateChatPromptType, type index$9_CreatePromptRequest as CreatePromptRequest, type index$9_CreateTextPromptRequest as CreateTextPromptRequest, index$9_CreateTextPromptType as CreateTextPromptType, type index$9_DeletePromptRequest as DeletePromptRequest, type index$9_GetPromptRequest as GetPromptRequest, type index$9_ListPromptsMetaRequest as ListPromptsMetaRequest, type index$9_PlaceholderMessage as PlaceholderMessage, index$9_PlaceholderMessageType as PlaceholderMessageType, index$9_Prompt as Prompt, type index$9_PromptMeta as PromptMeta, type index$9_PromptMetaListResponse as PromptMetaListResponse, index$9_PromptType as PromptType, type index$9_TextPrompt as TextPrompt };
|
|
3953
3980
|
}
|
|
3954
3981
|
|
|
3955
3982
|
/**
|
|
@@ -7128,18 +7155,18 @@ declare class Prompts {
|
|
|
7128
7155
|
*
|
|
7129
7156
|
* @example
|
|
7130
7157
|
* await client.prompts.create({
|
|
7131
|
-
* type: "chat",
|
|
7132
7158
|
* name: "name",
|
|
7133
7159
|
* prompt: [{
|
|
7134
|
-
* type: "chatmessage",
|
|
7135
7160
|
* role: "role",
|
|
7136
|
-
* content: "content"
|
|
7161
|
+
* content: "content",
|
|
7162
|
+
* type: undefined
|
|
7137
7163
|
* }, {
|
|
7138
|
-
* type: "chatmessage",
|
|
7139
7164
|
* role: "role",
|
|
7140
|
-
* content: "content"
|
|
7165
|
+
* content: "content",
|
|
7166
|
+
* type: undefined
|
|
7141
7167
|
* }],
|
|
7142
7168
|
* config: undefined,
|
|
7169
|
+
* type: "chat",
|
|
7143
7170
|
* labels: undefined,
|
|
7144
7171
|
* tags: undefined,
|
|
7145
7172
|
* commitMessage: undefined
|
|
@@ -7927,7 +7954,7 @@ declare class LangfuseAPIClient {
|
|
|
7927
7954
|
get trace(): Trace;
|
|
7928
7955
|
}
|
|
7929
7956
|
|
|
7930
|
-
type LangfuseEnvVar = "LANGFUSE_PUBLIC_KEY" | "LANGFUSE_SECRET_KEY" | "LANGFUSE_BASE_URL" | "LANGFUSE_BASEURL" | "LANGFUSE_TIMEOUT" | "LANGFUSE_FLUSH_AT" | "LANGFUSE_FLUSH_INTERVAL" | "LANGFUSE_LOG_LEVEL" | "LANGFUSE_RELEASE" | "LANGFUSE_TRACING_ENVIRONMENT";
|
|
7957
|
+
type LangfuseEnvVar = "LANGFUSE_PUBLIC_KEY" | "LANGFUSE_SECRET_KEY" | "LANGFUSE_BASE_URL" | "LANGFUSE_BASEURL" | "LANGFUSE_TIMEOUT" | "LANGFUSE_FLUSH_AT" | "LANGFUSE_FLUSH_INTERVAL" | "LANGFUSE_LOG_LEVEL" | "LANGFUSE_DEBUG" | "LANGFUSE_RELEASE" | "LANGFUSE_TRACING_ENVIRONMENT";
|
|
7931
7958
|
declare function getEnv(key: LangfuseEnvVar): string | undefined;
|
|
7932
7959
|
declare function generateUUID(globalThis?: any): string;
|
|
7933
7960
|
declare function safeSetTimeout(fn: () => void, timeout: number): any;
|
|
@@ -8294,4 +8321,4 @@ interface PropagateAttributesParams {
|
|
|
8294
8321
|
declare function propagateAttributes<A extends unknown[], F extends (...args: A) => ReturnType<F>>(params: PropagateAttributesParams, fn: F): ReturnType<F>;
|
|
8295
8322
|
declare function getPropagatedAttributesFromContext(context: Context): Record<string, string | string[]>;
|
|
8296
8323
|
|
|
8297
|
-
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, ChatMessageWithPlaceholders, type ChatPrompt, type Comment, CommentObjectType, type ConfigCategory, type CorrectionScore, type CreateAnnotationQueueAssignmentResponse, type CreateAnnotationQueueItemRequest, type CreateAnnotationQueueRequest, type CreateApiKeyRequest, type CreateBlobStorageIntegrationRequest, type CreateChatPromptRequest, type CreateCommentRequest, type CreateCommentResponse, type CreateDatasetItemRequest, type CreateDatasetRequest, type CreateDatasetRunItemRequest, type CreateEventBody, type CreateEventEvent, type CreateGenerationBody, type CreateGenerationEvent, type CreateModelRequest, type CreateObservationEvent, type CreateProjectRequest, CreatePromptRequest, type CreateScoreConfigRequest, type CreateScoreRequest, type CreateScoreResponse, type CreateScoreValue, type CreateSpanBody, type CreateSpanEvent, type CreateTextPromptRequest, 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, 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 };
|
|
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 };
|
package/dist/index.mjs
CHANGED
|
@@ -87,7 +87,10 @@ var LogLevel = /* @__PURE__ */ ((LogLevel2) => {
|
|
|
87
87
|
return LogLevel2;
|
|
88
88
|
})(LogLevel || {});
|
|
89
89
|
function parseLogLevelFromEnv() {
|
|
90
|
+
var _a2;
|
|
90
91
|
if (typeof process === "object" && "env" in process) {
|
|
92
|
+
if (((_a2 = getEnv("LANGFUSE_DEBUG")) == null ? void 0 : _a2.toLowerCase()) === "true")
|
|
93
|
+
return 0 /* DEBUG */;
|
|
91
94
|
const envValue = getEnv("LANGFUSE_LOG_LEVEL");
|
|
92
95
|
const value = (envValue != null ? envValue : "").toUpperCase();
|
|
93
96
|
switch (value) {
|
|
@@ -270,7 +273,7 @@ var resetGlobalLogger = () => {
|
|
|
270
273
|
// package.json
|
|
271
274
|
var package_default = {
|
|
272
275
|
name: "@langfuse/core",
|
|
273
|
-
version: "4.6.
|
|
276
|
+
version: "4.6.1",
|
|
274
277
|
description: "Core functions and utilities for Langfuse packages",
|
|
275
278
|
type: "module",
|
|
276
279
|
sideEffects: false,
|
|
@@ -774,6 +777,10 @@ var projects_exports = {};
|
|
|
774
777
|
// src/api/api/resources/prompts/index.ts
|
|
775
778
|
var prompts_exports = {};
|
|
776
779
|
__export(prompts_exports, {
|
|
780
|
+
ChatMessageType: () => ChatMessageType,
|
|
781
|
+
CreateChatPromptType: () => CreateChatPromptType,
|
|
782
|
+
CreateTextPromptType: () => CreateTextPromptType,
|
|
783
|
+
PlaceholderMessageType: () => PlaceholderMessageType,
|
|
777
784
|
PromptType: () => PromptType
|
|
778
785
|
});
|
|
779
786
|
|
|
@@ -783,6 +790,26 @@ var PromptType = {
|
|
|
783
790
|
Text: "text"
|
|
784
791
|
};
|
|
785
792
|
|
|
793
|
+
// src/api/api/resources/prompts/types/ChatMessageType.ts
|
|
794
|
+
var ChatMessageType = {
|
|
795
|
+
Chatmessage: "chatmessage"
|
|
796
|
+
};
|
|
797
|
+
|
|
798
|
+
// src/api/api/resources/prompts/types/PlaceholderMessageType.ts
|
|
799
|
+
var PlaceholderMessageType = {
|
|
800
|
+
Placeholder: "placeholder"
|
|
801
|
+
};
|
|
802
|
+
|
|
803
|
+
// src/api/api/resources/prompts/types/CreateChatPromptType.ts
|
|
804
|
+
var CreateChatPromptType = {
|
|
805
|
+
Chat: "chat"
|
|
806
|
+
};
|
|
807
|
+
|
|
808
|
+
// src/api/api/resources/prompts/types/CreateTextPromptType.ts
|
|
809
|
+
var CreateTextPromptType = {
|
|
810
|
+
Text: "text"
|
|
811
|
+
};
|
|
812
|
+
|
|
786
813
|
// src/api/api/resources/scim/index.ts
|
|
787
814
|
var scim_exports = {};
|
|
788
815
|
|
|
@@ -9121,18 +9148,18 @@ var Prompts = class {
|
|
|
9121
9148
|
*
|
|
9122
9149
|
* @example
|
|
9123
9150
|
* await client.prompts.create({
|
|
9124
|
-
* type: "chat",
|
|
9125
9151
|
* name: "name",
|
|
9126
9152
|
* prompt: [{
|
|
9127
|
-
* type: "chatmessage",
|
|
9128
9153
|
* role: "role",
|
|
9129
|
-
* content: "content"
|
|
9154
|
+
* content: "content",
|
|
9155
|
+
* type: undefined
|
|
9130
9156
|
* }, {
|
|
9131
|
-
* type: "chatmessage",
|
|
9132
9157
|
* role: "role",
|
|
9133
|
-
* content: "content"
|
|
9158
|
+
* content: "content",
|
|
9159
|
+
* type: undefined
|
|
9134
9160
|
* }],
|
|
9135
9161
|
* config: undefined,
|
|
9162
|
+
* type: "chat",
|
|
9136
9163
|
* labels: undefined,
|
|
9137
9164
|
* tags: undefined,
|
|
9138
9165
|
* commitMessage: undefined
|
|
@@ -12562,7 +12589,10 @@ export {
|
|
|
12562
12589
|
BlobStorageExportMode,
|
|
12563
12590
|
BlobStorageIntegrationFileType,
|
|
12564
12591
|
BlobStorageIntegrationType,
|
|
12592
|
+
ChatMessageType,
|
|
12565
12593
|
CommentObjectType,
|
|
12594
|
+
CreateChatPromptType,
|
|
12595
|
+
CreateTextPromptType,
|
|
12566
12596
|
DatasetStatus,
|
|
12567
12597
|
Error2 as Error,
|
|
12568
12598
|
LANGFUSE_SDK_EXPERIMENT_ENVIRONMENT,
|
|
@@ -12585,6 +12615,7 @@ export {
|
|
|
12585
12615
|
NotFoundError,
|
|
12586
12616
|
ObservationLevel,
|
|
12587
12617
|
ObservationType,
|
|
12618
|
+
PlaceholderMessageType,
|
|
12588
12619
|
PricingTierOperator,
|
|
12589
12620
|
PromptType,
|
|
12590
12621
|
ScoreConfigDataType,
|