Langfuse JS/TS SDKs
    Preparing search index...

    Module @langfuse/browser

    GitHub Banner

    @langfuse/browser

    Browser SDK for sending Langfuse scores from public-key environments.

    import { LangfuseBrowser } from "@langfuse/browser";

    const langfuse = new LangfuseBrowser({
    publicKey: "pk-lf-...",
    baseUrl: "https://cloud.langfuse.com",
    });

    await langfuse.score({
    traceId: "trace-id",
    name: "user_feedback",
    value: 1,
    });

    This package only supports score ingestion and uses public-key Bearer auth. Do not pass Langfuse secret keys to browser code.

    MIT

    Classes

    LangfuseBrowser
    LangfuseBrowserError

    Interfaces

    LangfuseBrowserOptions
    LangfuseBrowserScoreBody
    LangfuseBrowserScoreResult
    LangfuseIngestionError
    LangfuseIngestionResponse
    LangfuseIngestionSuccess

    Type Aliases

    LangfuseScoreDataType

    Variables

    LangfuseScoreDataType