LangfuseClient

open class LangfuseClient(secretKey: String = SystemPropertyUtils.resolvePlaceholders( "\${LANGFUSE_SECRET_KEY}", ), publicKey: String = SystemPropertyUtils.resolvePlaceholders( "\${LANGFUSE_PUBLIC_KEY}", ), host: String = SystemPropertyUtils.resolvePlaceholders( "\${LANGFUSE_HOST}", ))

LangfuseClient is a client library for interacting with the Langfuse API. It provides various APIs for accessing and managing resources within the Langfuse platform.

Constructors

Link copied to clipboard
constructor(secretKey: String, publicKey: String)
constructor(secretKey: String = SystemPropertyUtils.resolvePlaceholders( "\${LANGFUSE_SECRET_KEY}", ), publicKey: String = SystemPropertyUtils.resolvePlaceholders( "\${LANGFUSE_PUBLIC_KEY}", ), host: String = SystemPropertyUtils.resolvePlaceholders( "\${LANGFUSE_HOST}", ))

primary constructor, accepts secretKey, publicKey, and host with default values from system properties

Properties

Link copied to clipboard
open val commentsApi: <Error class: unknown class>

Provides access to the API methods related to comments. Initialized lazily using the prepared ApiClient instance.

Link copied to clipboard
open val datasetItemsApi: <Error class: unknown class>

Provides an instance of the DatasetItemsApi for interacting with dataset items within the Langfuse system. Initialized lazily using an ApiClient to facilitate API operations related to dataset items. Part of the LangfuseClient which serves as a comprehensive client for engaging with various Langfuse APIs.

Link copied to clipboard
open val datasetRunItemsApi: <Error class: unknown class>

Provides access to the DatasetRunItemsApi instance for managing dataset run items. It is initialized lazily using the provided client, ensuring that the API client is ready for interaction when needed.

Link copied to clipboard
open val datasetsApi: <Error class: unknown class>

Provides access to the Datasets API, enabling operations related to datasets.

Link copied to clipboard
open val healthApi: <Error class: unknown class>

Provides an instance of the HealthApi interface for checking the health of the API and database.

Link copied to clipboard
open val ingestionApi: <Error class: unknown class>

Provides access to the Ingestion API for handling data ingestions through the client. This property is lazily initialized and uses the provided client instance from the enclosing LangfuseClient class to create an IngestionApi object. It is intended to be used for making calls to the underlying data ingestion functionalities offered by the API.

Link copied to clipboard
open val metricsApi: <Error class: unknown class>

Provides access to the Metrics API through the MetricsApi class. This property is lazily initialized using the client configured in the LangfuseClient. It facilitates interactions with the metrics functionality of the API.

Link copied to clipboard
open val modelsApi: <Error class: unknown class>

Provides access to the Models API, which is responsible for managing operations related to models within the LangfuseClient. It is initialized lazily with an instance of ModelsApi, utilizing the client configured for API communication.

Link copied to clipboard
open val observationsApi: <Error class: unknown class>

Provides access to operations related to observations within the API. This is lazily initialized and uses the provided client to perform its operations. The ObservationsApi is responsible for handling all interactions related to observations.

Link copied to clipboard
open val projectsApi: <Error class: unknown class>

Provides an instance of ProjectsApi for accessing project-related API operations.

Link copied to clipboard
open val promptsApi: <Error class: unknown class>

Provides access to the Prompts API for interacting with prompt-related operations. Initialized lazily with an instance of PromptsApi using the configured ApiClient. Used within the LangfuseClient for managing prompt data.

Link copied to clipboard
open val scoreApi: <Error class: unknown class>

Provides access to the ScoreApi for interacting with scoring-related operations. The scoreApi is initialized lazily and is configured using the ApiClient instance.

Link copied to clipboard
open val scoreConfigsApi: <Error class: unknown class>

Provides access to score configuration-related operations through the ScoreConfigsApi. This property is initialized lazily and utilizes the underlying HTTP client. It's part of the LangfuseClient, which serves as a client interface to interact with various APIs, including score configurations, within the application.

Link copied to clipboard
open val sessionsApi: <Error class: unknown class>

Provides access to the Sessions API, enabling the management and retrieval of session-related data. This property is initialized lazily upon first access using the provided ApiClient instance.

Link copied to clipboard
open val traceApi: <Error class: unknown class>

Provides access to the Trace API operations using the configured API client.