Skip to content

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

197 B
Raw Blame
import { type Role } from "@langfuse/shared/src/db";

export const hasOwnRole = <T extends object>(
  p: T,
): p is Extract<T, { role: Role }> =>
  Object.prototype.hasOwnProperty.call(p, "role");