Skip to content

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

250 B
Raw Blame
export function resolveTopicFacetId(
  facets: readonly { facetId: string }[],
  requestedId: string | undefined,
): string | undefined {
  if (facets.some((facet) => facet.facetId === requestedId)) return requestedId;
  return facets[0]?.facetId;
}