hari7261 commited on
Commit
bc69c26
·
verified ·
1 Parent(s): 61b7033

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -11
app.py CHANGED
@@ -311,14 +311,15 @@ Provide the best solution with explanation and consider edge cases."""
311
  def generate_error_response(self, lang: str, lang_data: dict, query: str, code: str) -> str:
312
  """Generate detailed error explanation and solution"""
313
  common_errors = lang_data.get('common_errors', [])
314
-
315
- response = f"""Let me help you debug this {lang} code. Here's a systematic approach:
316
-
317
- 🔍 **Error Analysis:**
318
- First, let's identify the error type and root cause. Common {lang} errors include:
319
- {', '.join([e.get('name', 'Unknown') for e in common_errors[:3]])}
320
-
321
- 💻 **Code Inspection:**
322
- For the provided code:
323
- ```{lang}
324
- {code if code else '# No code provided'}
 
 
311
  def generate_error_response(self, lang: str, lang_data: dict, query: str, code: str) -> str:
312
  """Generate detailed error explanation and solution"""
313
  common_errors = lang_data.get('common_errors', [])
314
+
315
+ response = (
316
+ f"Let me help you debug this {lang} code. Here's a systematic approach:\n\n"
317
+ "**Error Analysis:**\n"
318
+ f"First, let's identify the error type and root cause. Common {lang} errors include:\n"
319
+ f"{', '.join([e.get('name', 'Unknown') for e in common_errors[:3]])}\n\n"
320
+ "**Code Inspection:**\n"
321
+ "For the provided code:\n"
322
+ f"```{lang}\n"
323
+ f"{code if code else '# No code provided'}\n"
324
+ "```\n"
325
+ )