Skip to content

Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)

Python

fix TODO

Abi Rajac61a2ac7729f
diff --git a/backend/routes/generate_code.py b/backend/routes/generate_code.py
index 0c6e9212..f58a89a1 100644
--- a/backend/routes/generate_code.py
+++ b/backend/routes/generate_code.py
@@ -199,14 +199,9 @@ async def stream_code(websocket: WebSocket):
params, valid_stack, code_generation_model, validated_input_mode
)
except:
- # TODO(*): This should use variantIndex
- await websocket.send_json(
- {
- "type": "error",
- "value": "Error assembling prompt. Contact support at [email protected]",
- }
+ await throw_error(
+ "Error assembling prompt. Contact support at [email protected]"
)
- await websocket.close()
raise
pprint_prompt(prompt_messages) # type: ignore