Skip to content

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

fix(trace-ui): remove unnecessary json key (#7454)

Hassieb Pakzad164f81f24994
diff --git a/web/src/components/schemas/ChatMlSchema.ts b/web/src/components/schemas/ChatMlSchema.ts
index 2aff31ac13..37cdb28e25 100644
--- a/web/src/components/schemas/ChatMlSchema.ts
+++ b/web/src/components/schemas/ChatMlSchema.ts
@@ -130,7 +130,7 @@ export const ChatMlMessageSchema = z
name,
content,
audio,
- json: Object.keys(other).length === 0 ? undefined : other,
+ ...(Object.keys(other).length === 0 ? {} : { json: other }),
}));
export type ChatMlMessageSchema = z.infer<typeof ChatMlMessageSchema>;