Hierarchy

  • LangfuseObservationClient
    • LangfuseEventClient

Constructors

  • Parameters

    • client: LangfuseCore
    • id: string
    • traceId: string

    Returns LangfuseEventClient

Properties

client: LangfuseCore
id: string
observationId: null | string
traceId: string

Methods

  • Parameters

    • body: Omit<Omit<{
          id?: null | string;
          input?: any;
          level?:
              | "DEBUG"
              | "DEFAULT"
              | "WARNING"
              | "ERROR";
          metadata?: any;
          name?: null | string;
          output?: any;
          parentObservationId?: null | string;
          startTime?: null | Date;
          statusMessage?: null | string;
          traceId?: null | string;
          version?: null | string;
      }, "externalId" | "traceIdType">, "traceId" | "parentObservationId">

    Returns LangfuseEventClient

  • Parameters

    • body: Omit<Omit<{
          completionStartTime?: null | Date;
          endTime?: null | Date;
          id?: null | string;
          input?: any;
          level?:
              | "DEBUG"
              | "DEFAULT"
              | "WARNING"
              | "ERROR";
          metadata?: any;
          model?: null | string;
          modelParameters?: null | {
              [key: string]: components["schemas"]["MapValue"] | undefined;
          };
          name?: null | string;
          output?: any;
          parentObservationId?: null | string;
          promptName?: null | string;
          promptVersion?: null | number;
          startTime?: null | Date;
          statusMessage?: null | string;
          traceId?: null | string;
          usage?: {
              input?: null | number;
              inputCost?: null | number;
              output?: null | number;
              outputCost?: null | number;
              total?: null | number;
              totalCost?: null | number;
              unit?:
                  | "CHARACTERS"
                  | "TOKENS"
                  | "MILLISECONDS"
                  | "SECONDS"
                  | "IMAGES"
                  | "REQUESTS";
          } | {
              completionTokens?: null | number;
              promptTokens?: null | number;
              totalTokens?: null | number;
          };
          version?: null | string;
      }, "externalId" | "traceIdType">,
          | "traceId"
          | "parentObservationId"
          | "promptName"
          | "promptVersion"> & PromptInput

    Returns LangfuseGenerationClient

  • Returns string

  • Parameters

    • body: Omit<Omit<{
          comment?: null | string;
          configId?: null | string;
          dataType?: "NUMERIC" | "BOOLEAN" | "CATEGORICAL";
          id?: null | string;
          name: string;
          observationId?: null | string;
          traceId: string;
          value: string | number;
      }, "externalId" | "traceIdType">, "traceId" | "parentObservationId">

    Returns this

  • Parameters

    • body: Omit<Omit<{
          endTime?: null | Date;
          id?: null | string;
          input?: any;
          level?:
              | "DEBUG"
              | "DEFAULT"
              | "WARNING"
              | "ERROR";
          metadata?: any;
          name?: null | string;
          output?: any;
          parentObservationId?: null | string;
          startTime?: null | Date;
          statusMessage?: null | string;
          traceId?: null | string;
          version?: null | string;
      }, "externalId" | "traceIdType">, "traceId" | "parentObservationId">

    Returns LangfuseSpanClient