Skip to content

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

Python

Simplify SYSTEM_PROMPT usage

Abi Raja681e6e921c96
diff --git a/backend/prompts/__init__.py b/backend/prompts/__init__.py
index 846bf304..e8553aa6 100644
--- a/backend/prompts/__init__.py
+++ b/backend/prompts/__init__.py
@@ -153,11 +153,11 @@ def assemble_prompt(
text_prompt: str = "",
) -> list[ChatCompletionMessageParam]:
system_content = SYSTEM_PROMPT
- user_prompt = USER_PROMPT
+ user_prompt = USER_PROMPT.strip() + f"\n\nSelected stack: {stack}"
# Append optional text instructions if provided
if text_prompt.strip():
- user_prompt = user_prompt.strip() + "\n\nAdditional instructions: " + text_prompt
+ user_prompt = user_prompt + "\n\nAdditional instructions: " + text_prompt
user_content: list[ChatCompletionContentPartParam] = []
for image_data_url in image_data_urls: