Pieces/AI(45)

AI pieces from Beste UI, drop-in widgets built with shadcn/ui and Tailwind CSS.

rate limited users get a 429 response

rate-limited users get a 429 response with a Retry-After header

Diff Suggestion

Two-line before/after suggestion with a rose strike-through original and an emerald accepted revision.

batch_01HX9K2820/1,000
ok 820fail 4

Batch Job

Batch inference progress card with completed/failed counts and a stacked bar where the error segment shows in rose.

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

Export JSON

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

stream142 tok/s
The quick brown fox jumps over

Token Stream

Live token visualizer with tone-tinted token chips, tokens-per-second rate, and a pulsing caret at the end.

"where is my order?"

order_status
87%
shipping_eta
9%
refund_request
4%

Intent Classifier

Intent ranking panel with the raw user input quoted above and a list of candidate labels with confidence bars.

NovaSenior engineer
ConciseCode-firstTerminal-friendly

Persona Card

Assistant persona card with a tone-colored header, role label, initial avatar, and a row of personality trait chips.

Anthropicclaude-sonnet-4

Provider Chip

Pill showing the LLM provider with a branded initial avatar, the provider name, and the exact model identifier.

Query
Retrieve
Rerank
Answer

RAG Pipeline

Horizontal pipeline diagram with tone-tinted stage nodes connected by arrows, showing the path from query to answer.

docs
top_k = 5
lang:ensection:guides

Vector Search Filter

Vector query bar with namespace name, top_k value, and removable key:value filter chips for metadata.

Research Copilot4 tools

Searches papers and drafts literature reviews on request.

Assistant Card

Catalog card for a configured assistant with a tone-filled bot tile, name, short description, and the tool count.

claude-sonnet

Explain rate limiting strategies with simple examples.

Playground Prompt

Playground card with the selected model, a prompt draft box, and a tone-colored Run button to kick off the request.

Input
1,240$0.0031
Output
528$0.0053
Total
1,768 tok$0.0084

Cost Estimate

Token and cost breakdown table with input/output rows and a totaled bottom line. Tone highlights the final amount.

Guardrailsactive
PII redactionToxicityPrompt injection

Guardrail Badge

Safety guardrail card with an emerald shield, active status pill, and a row of enabled policy tags.

llama-3-8b+support_tickets
running

Fine-tune Run

Fine-tuning job row with base model + dataset, a status indicator, and a tone-colored progress bar that flips emerald on success.

support_tickets48,200 rows · 120 MB
train 80%val 10%test 10%

Dataset Card

Dataset summary with row count, total size, and a stacked train/val/test split bar. Tone controls the dataset icon tile and train segment.

Harassmenthigh

Response blocked for containing targeted insults.

Safety Filter

Moderation card with a rose shield icon, category label, severity pill, and the reason the output was blocked.

Epoch7/10
loss0.0421
step 1,280/2,00064%

Training Progress

Training run card with current epoch, step counter, loss value, and a violet progress bar reflecting completion.

whiteboard.jpg1920×1080
Analyzing
diagramtextarrows

Vision Input

Attached image card with a tone-tinted thumbnail tile, a scanning line overlay, filename, dimensions, and detected-object chips.

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.

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.

support-reply.prompt
You are a helpful assistant. The user asked: {{question}}. Answer in {{tone}} tone.

Prompt Template

Monospace prompt card with inline handlebars-style variables highlighted in violet against plain body text.

Thought for 8 seconds

User wants to rate limit 100 req/min per key.

Leaky bucket gives smoother traffic than fixed window.

Redis INCR with TTL is the simplest implementation.

Chain of Thought

Collapsible reasoning panel with a brain icon header and italic thought bullets on a left border rail.

Parse user intent
Search knowledge base
Draft response
Format citations

Agent Steps

Vertical agent plan with done, active, and pending states indicated by check, spinner, and dot icons.

search_docs
done
query:"rate limiting"
limit:5

Function Call

Tool invocation card with the function name, typed arguments in monospace, and a running or done status pill.