Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

423 B
Raw Blame
import { type FilterCondition, type FilterState } from "@langfuse/shared";

const EXPERIMENT_ROOT_OBSERVATION_FILTER = {
  type: "boolean",
  column: "isExperimentItemRootSpan",
  operator: "=",
  value: true,
} satisfies FilterCondition;

export function getExperimentEvalPreviewFilters(
  filter: FilterState | null | undefined,
): FilterState {
  return [...(filter ?? []), { ...EXPERIMENT_ROOT_OBSERVATION_FILTER }];
}