Langfuse JS/TS SDKs
    Preparing search index...

    Module @langfuse/core

    GitHub Banner

    @langfuse/core

    This is the core package of the Langfuse JS SDK containing the public API client, logger, utilities, and more.

    Package NPM Description Environments
    @langfuse/client NPM Langfuse API client for universal JavaScript environments Universal JS
    @langfuse/tracing NPM Langfuse instrumentation methods based on OpenTelemetry Node.js 20+
    @langfuse/otel NPM Langfuse OpenTelemetry export helpers Node.js 20+
    @langfuse/openai NPM Langfuse integration for OpenAI SDK Universal JS
    @langfuse/langchain NPM Langfuse integration for LangChain Universal JS

    MIT

    Namespaces

    annotationQueues
    ChatMessageWithPlaceholders
    comments
    commons
    CreatePromptRequest
    datasetItems
    datasetRunItems
    datasets
    GetScoresResponseData
    health
    ingestion
    IngestionEvent
    LangfuseAPIClient
    media
    metrics
    models
    observations
    organizations
    projects
    Prompt
    prompts
    promptVersion
    scim
    score
    Score
    scoreConfigs
    ScoreV1
    scoreV2
    sessions
    trace
    utils

    Enumerations

    LangfuseOtelSpanAttributes
    LogLevel

    Classes

    AccessDeniedError
    Error
    LangfuseAPIClient
    LangfuseAPIError
    LangfuseAPITimeoutError
    LangfuseMedia
    logger
    Logger
    MethodNotAllowedError
    NotFoundError
    ServiceUnavailableError
    UnauthorizedError

    Interfaces

    AnnotationQueue
    AnnotationQueueItem
    ApiKeyDeletionResponse
    ApiKeyList
    ApiKeyResponse
    ApiKeySummary
    AuthenticationScheme
    BaseEvent
    BasePrompt
    BaseScore
    BaseScoreV1
    BooleanScore
    BooleanScoreV1
    BulkConfig
    CategoricalScore
    CategoricalScoreV1
    ChatMessage
    ChatPrompt
    Comment
    ConfigCategory
    CreateAnnotationQueueItemRequest
    CreateApiKeyRequest
    CreateChatPromptRequest
    CreateCommentRequest
    CreateCommentResponse
    CreateDatasetItemRequest
    CreateDatasetRequest
    CreateDatasetRunItemRequest
    CreateEventBody
    CreateEventEvent
    CreateGenerationBody
    CreateGenerationEvent
    CreateModelRequest
    CreateObservationEvent
    CreateProjectRequest
    CreateScoreConfigRequest
    CreateScoreRequest
    CreateScoreResponse
    CreateSpanBody
    CreateSpanEvent
    CreateTextPromptRequest
    CreateUserRequest
    Dataset
    DatasetItem
    DatasetRun
    DatasetRunItem
    DatasetRunWithItems
    DeleteAnnotationQueueItemResponse
    DeleteDatasetItemResponse
    DeleteDatasetRunResponse
    DeleteTraceResponse
    DeleteTracesRequest
    EmptyResponse
    FilterConfig
    GetAnnotationQueueItemsRequest
    GetAnnotationQueuesRequest
    GetCommentsRequest
    GetCommentsResponse
    GetDatasetItemsRequest
    GetDatasetRunsRequest
    GetDatasetsRequest
    GetMediaResponse
    GetMediaUploadUrlRequest
    GetMediaUploadUrlResponse
    GetMetricsRequest
    GetModelsRequest
    GetObservationsRequest
    GetPromptRequest
    GetScoreConfigsRequest
    GetScoresRequest
    GetScoresResponse
    GetScoresResponseDataBoolean
    GetScoresResponseDataCategorical
    GetScoresResponseDataNumeric
    GetScoresResponseTraceData
    GetSessionsRequest
    GetTracesRequest
    HealthResponse
    IngestionError
    IngestionRequest
    IngestionResponse
    IngestionSuccess
    ListDatasetRunItemsRequest
    ListPromptsMetaRequest
    ListUsersRequest
    LoggerConfig
    MembershipRequest
    MembershipResponse
    MembershipsResponse
    MetricsResponse
    Model
    ModelPrice
    NumericScore
    NumericScoreV1
    Observation
    ObservationBody
    Observations
    ObservationsView
    ObservationsViews
    OpenAiCompletionUsageSchema
    OpenAiResponseUsageSchema
    OpenAiUsage
    OptionalObservationBody
    OrganizationProject
    OrganizationProjectsResponse
    PaginatedAnnotationQueueItems
    PaginatedAnnotationQueues
    PaginatedDatasetItems
    PaginatedDatasetRunItems
    PaginatedDatasetRuns
    PaginatedDatasets
    PaginatedModels
    PaginatedSessions
    PatchMediaBody
    PlaceholderMessage
    Project
    ProjectDeletionResponse
    Projects
    PromptMeta
    PromptMetaListResponse
    ResourceMeta
    ResourceType
    ResourceTypesResponse
    SchemaExtension
    SchemaResource
    SchemasResponse
    ScimEmail
    ScimFeatureSupport
    ScimName
    ScimUser
    ScimUsersListResponse
    ScoreBody
    ScoreConfig
    ScoreConfigs
    ScoreEvent
    SdkLogBody
    SdkLogEvent
    ServiceProviderConfig
    Session
    SessionWithTraces
    Sort
    TextPrompt
    Trace
    TraceBody
    TraceEvent
    Traces
    TraceWithDetails
    TraceWithFullDetails
    UpdateAnnotationQueueItemRequest
    UpdateEventBody
    UpdateGenerationBody
    UpdateGenerationEvent
    UpdateObservationEvent
    UpdateProjectRequest
    UpdatePromptRequest
    UpdateSpanBody
    UpdateSpanEvent
    Usage
    UserMeta

    Type Aliases

    AnnotationQueueObjectType
    AnnotationQueueStatus
    ChatMessageWithPlaceholders
    CommentObjectType
    CreatePromptRequest
    CreateScoreValue
    DatasetStatus
    GetScoresResponseData
    IngestionEvent
    IngestionUsage
    LangfuseMediaParams
    MapValue
    MediaContentType
    MembershipRole
    ModelUsageUnit
    ObservationLevel
    ObservationType
    ParsedMediaReference
    Prompt
    Score
    ScoreDataType
    ScoreSource
    ScoreV1
    UsageDetails

    Variables

    AnnotationQueueObjectType
    AnnotationQueueStatus
    CommentObjectType
    DatasetStatus
    LANGFUSE_SDK_NAME
    LANGFUSE_SDK_VERSION
    LANGFUSE_TRACER_NAME
    MediaContentType
    MembershipRole
    ModelUsageUnit
    ObservationLevel
    ObservationType
    ScoreDataType
    ScoreSource

    Functions

    base64Decode
    base64Encode
    base64ToBytes
    bytesToBase64
    configureGlobalLogger
    createLogger
    generateUUID
    getEnv
    getGlobalLogger
    resetGlobalLogger
    safeSetTimeout