Skip to content

ILangfuseDatasetClient

NexusLabs.Needlr.AgentFramework.Langfuse

ILangfuseDatasetClient Interface

Creates and populates Langfuse datasets — the named collections of eval cases that experiment runs are scored against.

public interface ILangfuseDatasetClient

Properties

ILangfuseDatasetClient.IsEnabled Property

Gets a value indicating whether dataset operations are performed. false when Langfuse is not configured, in which case all members are no-ops.

bool IsEnabled { get; }

Property Value

System.Boolean

Methods

ILangfuseDatasetClient.EnsureDatasetAsync(string, string, CancellationToken) Method

Ensures a dataset with the given name exists, creating it only when absent. Safe to call on every run.

System.Threading.Tasks.Task EnsureDatasetAsync(string name, string? description=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

name System.String

The dataset name.

description System.String

An optional description applied when the dataset is created.

cancellationToken System.Threading.CancellationToken

A cancellation token.

Returns

System.Threading.Tasks.Task
A task that completes when the dataset exists in Langfuse.

ILangfuseDatasetClient.UpsertItemAsync(LangfuseDatasetItem, CancellationToken) Method

Upserts a dataset item. When Id is set, an existing item with that id is updated; otherwise a new item is created.

System.Threading.Tasks.Task UpsertItemAsync(NexusLabs.Needlr.AgentFramework.Langfuse.LangfuseDatasetItem item, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

item LangfuseDatasetItem

The item to upsert.

cancellationToken System.Threading.CancellationToken

A cancellation token.

Returns

System.Threading.Tasks.Task
A task that completes when the item has been persisted.