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
}"
/>

More AI pieces

View all AI
OPENAI_API_KEY
sk-••••••••••••••••••••••••••••••••

API Key Input

Masked API key field with a show/hide eye toggle and a copy button, tagged with the env var name.

ts
const slug = (s: string) =>
  s.toLowerCase().replace(/\s+/g, '-');

Generated Code

AI code output card with a language tag, copy and regenerate actions, and a monospace block below.

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

Streaming Response

Partial assistant reply bubble with a blinking block cursor on the trailing character.

embedding.vec1,536 dims
[0]cosine similarity ready[15]

Embedding Preview

Vector embedding visualizer with a zero baseline, positive values drawn upward in the tone color and negatives drawn downward in muted.

Feedback Row

Thumbs up and down buttons with tinted active state, alongside copy and share actions.

Implementing rate limits with Redis
0.92

Use INCR with an EXPIRE TTL to build a fixed-window limiter that resets every minute.

docs/guides/rate-limits.md

KB Search Result

Knowledge base hit card with a document title, snippet, source path, and an emerald similarity score badge.