Export JSON

response.json
{
  "answer": "Use Redis INCR",
  "sources": 3,
  "latency_ms": 420
}
About this piece

Export JSON

Mini code viewer for a structured response, with a filename header, copy button, and a preformatted JSON preview body.

Usage

The import and the props worth knowing about, in one place.

import { Ai43 } from "@/components/beste/piece/ai43";

<Ai43
  filename="response.json"
  content="{
  \"answer\": \"Use Redis INCR\",
  \"sources\": 3,
  \"latency_ms\": 420
}"
  bordered={false}
/>

More AI pieces

View all AI
OPENAI_API_KEY
sk-••••••••••••••••••••••••••••••••
ts
const slug = (s: string) =>
  s.toLowerCase().replace(/\s+/g, '-');

The smoothest cup of the morning starts with beans roasted just last

embedding.vec1,536 dims
“The capital of France is”
  • “Paris”64.3%
  • “the”18.7%
  • “located”8.1%
  • “also”4.2%