Spaces:
Sleeping
Sleeping
File size: 606 Bytes
51769a3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # code_generator.py — Natural language → H-Script code
# Implemented: via POST /ai/generate (ai/api/generate.py)
# Powered by Llama 3.1 8B Instant via Groq. Returns parsed code + explanation.
def generate_code(prompt: str, context: str = "") -> str:
"""
Implemented — see ai/api/generate.py for the live FastAPI endpoint.
Supports context injection (current editor content) for coherent code generation.
"""
return {
"status": "implemented",
"endpoint": "POST /ai/generate",
"note": "Call the FastAPI endpoint for live AI-powered code generation.",
}
|