Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)
Python
support Gemini 2.0 flash (GA version)
Abi Rajac88f9040f2f1
diff --git a/backend/evals/core.py b/backend/evals/core.pyindex ce5d84de..cd5a288a 100644--- a/backend/evals/core.py+++ b/backend/evals/core.py@@ -37,7 +37,11 @@ async def generate_code_core(callback=lambda x: process_chunk(x),model=model,)- elif model == Llm.GEMINI_2_0_FLASH_EXP or model == Llm.GEMINI_2_0_PRO_EXP:+ elif (+ model == Llm.GEMINI_2_0_FLASH_EXP+ or model == Llm.GEMINI_2_0_PRO_EXP+ or model == Llm.GEMINI_2_0_FLASH+ ):if not GEMINI_API_KEY:raise Exception("Gemini API key not found")diff --git a/backend/llm.py b/backend/llm.pyindex c628296e..506f8ad3 100644--- a/backend/llm.py+++ b/backend/llm.py@@ -29,6 +29,7 @@ class Llm(Enum):CLAUDE_3_5_SONNET_2024_10_22 = "claude-3-5-sonnet-20241022"CLAUDE_3_7_SONNET_2025_02_19 = "claude-3-7-sonnet-20250219"GEMINI_2_0_FLASH_EXP = "gemini-2.0-flash-exp"+ GEMINI_2_0_FLASH = "gemini-2.0-flash"GEMINI_2_0_PRO_EXP = "gemini-2.0-pro-exp-02-05"O1_2024_12_17 = "o1-2024-12-17"diff --git a/backend/routes/generate_code.py b/backend/routes/generate_code.pyindex 410a1c59..fff4d329 100644--- a/backend/routes/generate_code.py+++ b/backend/routes/generate_code.py@@ -302,6 +302,7 @@ async def stream_code(websocket: WebSocket):elif GEMINI_API_KEY and (model == Llm.GEMINI_2_0_PRO_EXPor model == Llm.GEMINI_2_0_FLASH_EXP+ or model == Llm.GEMINI_2_0_FLASH):tasks.append(stream_gemini_response(