Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)
Python
use sonnet 3.6 for creation but use sonnet 3.5 for updates
Abi Rajadcd351c00ae8
diff --git a/backend/routes/generate_code.py b/backend/routes/generate_code.pyindex 8bec698f..69dfedb5 100644--- a/backend/routes/generate_code.py+++ b/backend/routes/generate_code.py@@ -302,12 +302,19 @@ async def stream_code(websocket: WebSocket):await throw_error("Anthropic API key is missing.")raise Exception("Anthropic API key is missing.")+ # For creation, use Claude Sonnet 3.6 but it can be lazy+ # so for updates, we use Claude Sonnet 3.5+ if params["generationType"] == "create":+ claude_model = Llm.CLAUDE_3_5_SONNET_2024_10_22+ else:+ claude_model = Llm.CLAUDE_3_5_SONNET_2024_06_20+tasks.append(stream_claude_response(prompt_messages,api_key=anthropic_api_key,callback=lambda x, i=index: process_chunk(x, i),- model=Llm.CLAUDE_3_5_SONNET_2024_06_20,+ model=claude_model,))