Skip to content

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

Python

Write messages dict into a file for debugging.

Abi Raja4bb012922be5
diff --git a/backend/main.py b/backend/main.py
index 7034bfe0..22f7b3cf 100644
--- a/backend/main.py
+++ b/backend/main.py
@@ -24,6 +24,10 @@ async def stream_code_test(websocket: WebSocket):
messages = assemble_prompt("")
print(messages)
+ # Write the messages dict into a file for debugging
+ with open("messages.json", "w") as f:
+ f.write(str(messages))
+
await stream_openai_response(
messages,
lambda x: process_chunk(x),