Skip to content

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

fix: render records type `content` as chat message (#1362)

Marc Klingen027c3791a037
diff --git a/web/src/components/trace/IOPreview.tsx b/web/src/components/trace/IOPreview.tsx
index c052887837..bf41f3857a 100644
--- a/web/src/components/trace/IOPreview.tsx
+++ b/web/src/components/trace/IOPreview.tsx
@@ -120,7 +120,9 @@ const OpenAiMessageSchema = z
.object({
role: z.enum(["system", "user", "assistant", "function"]).optional(),
name: z.string().optional(),
- content: z.union([z.record(z.any()).array(), z.string()]).nullable(),
+ content: z
+ .union([z.record(z.any()), z.record(z.any()).array(), z.string()])
+ .nullable(),
function_call: z
.object({
name: z.string(),