-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.env.local.example
More file actions
76 lines (64 loc) · 3.31 KB
/
Copy path.env.local.example
File metadata and controls
76 lines (64 loc) · 3.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# ─── ESSENTIAL: Core Pipeline APIs ───────────────────────────
# NVIDIA NIM (Direct - Nemotron intent parsing with structured output)
# Get key at: https://build.nvidia.com
# Free tier: ~40 req/min, 1000-5000 initial credits
NVIDIA_API_KEY=nvapi-your-key-here
# OpenRouter (Unified LLM gateway for Claude + Nemotron routing)
# Get key at: https://openrouter.ai
# Fallback models, response healing, multi-model routing
OPENROUTER_API_KEY=sk-or-v1-your-key-here
# ─── OPTIONAL: Enhanced Capabilities ──────────────────────────
# Databricks (LLM gateway + Vector Search for design knowledge RAG)
# Get workspace and token at: https://www.databricks.com/learn
# Note: Vector search index must be created separately (catalog.schema.design_templates)
DATABRICKS_HOST=https://dbc-xxxxx.cloud.databricks.com
DATABRICKS_TOKEN=dapi_REDACTED_SEE_ENV_LOCAL
# Nia (Code documentation search - skip for demo, only useful during development)
# Get key at: https://docs.trynia.ai/welcome
# NIA_API_KEY=nk_your-key-here
# ─── Application Configuration ────────────────────────────────
# Studio branding (used for OpenRouter attribution headers)
APP_NAME=Studio
APP_URL=http://localhost:3000
# Feature Flags
# Enable/disable optional features (vector search, sketch analysis, etc.)
ENABLE_DESIGN_SEARCH=true
ENABLE_SKETCH_ANALYSIS=true
ENABLE_AGENTIC_REASONING=true
# ─── API Documentation ───────────────────────────────────────
# NEW API ROUTES:
#
# POST /api/parse-intent
# Uses NVIDIA NIM Nemotron with guided_json for structured intent parsing
# Input: { prompt: string }
# Output: { intent: ParametricIntent, thinking?: string }
# Confidence: Guaranteed valid JSON due to guided_json constraint
#
# POST /api/edit-node
# Updated to use OpenRouter + Claude with better parametric prompts
# Input: { instruction, node, fullTree? }
# Output: { params: Record<string, number|string> }
# Optimized: Low temperature for precise parameter edits
#
# POST /api/design-search
# Queries Databricks Vector Search for relevant design templates
# Input: { query, category?, numResults? }
# Output: { results: Template[], source, count }
# Graceful: Returns empty results if index not configured
#
# POST /api/generate-agentic
# Enhanced code generation with agentic thinking + design RAG
# Input: { designTree, prompt, useVectorSearch? }
# Output: { code, thinking?, templateCount, length }
# Combines: Vector search templates + Claude reasoning
#
# POST /api/sketch-analysis
# NVIDIA Nemotron 12B VL for sketch/photo parametric extraction
# Input: { imageUrl | imageBase64, mimeType?, context? }
# Output: { analysis: SketchAnalysis, timestamp }
# Use case: Upload photo of gear → extract teeth count, diameter, etc.
# ─── EXISTING APIs (Unchanged) ──────────────────────────────
# POST /api/generate - SSE stream for full pipeline (nemotron → claude → compile)
# POST /api/compile - OpenSCAD → STL binary compilation
# POST /api/critique - Nemotron code review
# POST /api/iterate - Multi-step refinement loop