Skip to content

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

fix(ui): pretty UI for chatml traces with custom roles (#2581)

Marc Klingendd9bf14204b6
diff --git a/web/src/components/trace/IOPreview.tsx b/web/src/components/trace/IOPreview.tsx
index 0942659ea3..c259216dd2 100644
--- a/web/src/components/trace/IOPreview.tsx
+++ b/web/src/components/trace/IOPreview.tsx
@@ -123,9 +123,7 @@ export const IOPreview: React.FC<{
const ChatMlMessageSchema = z
.object({
- role: z
- .enum(["system", "user", "assistant", "function", "tool"])
- .optional(),
+ role: z.string().optional(),
name: z.string().optional(),
content: z
.union([z.record(z.any()), z.string(), z.array(z.any())])