Skip to content

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

546 B
Raw Blame
import type { GalleryTemplate } from "@/src/features/evals/v2/types/templateGallery";

// Managed template keys are Langfuse-owned; custom (project) templates are
// reported only as custom, never by id or name.
export function getTemplateSelectionAnalyticsProperties(
  template: GalleryTemplate,
) {
  return template.source === "managed"
    ? {
        evaluatorType: template.evaluator.type,
        managedTemplateKey: template.key,
        isCustomTemplate: false,
      }
    : { evaluatorType: template.type, isCustomTemplate: true };
}