Spaces:
Paused

rahul7star commited on
Commit
e096130
·
verified ·
1 Parent(s): a5b2952

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -7
app.py CHANGED
@@ -178,16 +178,18 @@ def process_command(cmd: str, model: str = OLLAMA_MODEL):
178
  if not instruction:
179
  return "⚠️ /WRITE_PY requires instructions."
180
 
181
- llm_prompt = f"""
182
- You are an thinking expert software engineer with deep knowledge of multiple programming languages, frameworks, and architectural patterns. Your primary responsibility is to write clean, efficient, and maintainable code that fulfills the user's requirements precisely. You must think before acting.
183
 
184
- You must think first via [think]...[/think], you must write your thoughts before you output anything.
185
- During thinking, you will first propose 3 possible solutions and find the best one via self-verification and comparisons.
186
 
187
- User instruction: {instruction}
 
 
 
 
188
 
189
- Finally, provide the Python code ONLY with clear comments explaining every line.
190
- """
191
  response_text = run_ollama_cli(llm_prompt, model)
192
 
193
  code = extract_code_from_text(response_text)
 
178
  if not instruction:
179
  return "⚠️ /WRITE_PY requires instructions."
180
 
181
+ # llm_prompt = f"""
182
+ # You are an thinking expert software engineer with deep knowledge of multiple programming languages, frameworks, and architectural patterns. Your primary responsibility is to write clean, efficient, and maintainable code that fulfills the user's requirements precisely. You must think before acting.
183
 
184
+ # You must think first via [think]...[/think], you must write your thoughts before you output anything.
185
+ # During thinking, you will first propose 3 possible solutions and find the best one via self-verification and comparisons.
186
 
187
+ # User instruction: {instruction}
188
+
189
+ # Finally, provide the Python code ONLY with clear comments explaining every line.
190
+ # """
191
+ llm_prompt = f"Write Python code ONLY and explain all lines clearly in comments. Instructions: {instruction}"
192
 
 
 
193
  response_text = run_ollama_cli(llm_prompt, model)
194
 
195
  code = extract_code_from_text(response_text)