Skip to content

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

569 B
Raw Blame
import { z } from "zod";
import {
  hasValidTracingSearchTypes,
  singleFilterList,
  TRACING_SEARCH_TYPE_REQUIRED_MESSAGE,
  TracingSearchType,
  orderBy,
} from "@langfuse/shared";

export const GenerationTableOptions = z
  .object({
    projectId: z.string(), // Required for protectedProjectProcedure
    filter: singleFilterList,
    searchQuery: z.string().nullable(),
    searchType: z.array(TracingSearchType),
    orderBy: orderBy,
  })
  .refine(hasValidTracingSearchTypes, {
    message: TRACING_SEARCH_TYPE_REQUIRED_MESSAGE,
    path: ["searchType"],
  });