Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions bot/code_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
import traceback
import datetime
import py_compile
import threading
import logging
import json
import black
from flask import Flask, request, jsonify
from groq import Groq
Expand Down Expand Up @@ -78,10 +76,10 @@ def extract_code(self, response):
"""Extract the code within the triple quotes."""
parts = response.split("```")
if len(parts) >= 2:
code = parts[1].strip()
code = parts[1]
code = "\n".join(code.splitlines()[1:])
return code_formatter(code)
return ""

class DebugAgent:
def __init__(self, workspace):
self.workspace = workspace
Expand Down