🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
import { type ObservationLevelType } from "@langfuse/shared";
import { Badge } from "@/src/components/design-system/Badge/Badge";
type DisplayedObservationLevel = Exclude<ObservationLevelType, "DEFAULT">;
const observationLevelBadgeColors: Record<
DisplayedObservationLevel,
"yellow" | "red" | undefined
> = {
DEBUG: undefined,
WARNING: "yellow",
ERROR: "red",
};
export function ObservationLevelBadge({
level,
}: {
level: DisplayedObservationLevel;
}) {
return (
<Badge
color={observationLevelBadgeColors[level]}
size="md"
text={level.charAt(0) + level.slice(1).toLowerCase()}
/>
);
}