Spaces:
Sleeping
Sleeping
Update github_repo_analyzer.py
Browse files- github_repo_analyzer.py +2 -4
github_repo_analyzer.py
CHANGED
|
@@ -166,10 +166,8 @@ def safe_call_llm(client, prompt, retries=3):
|
|
| 166 |
|
| 167 |
def parse_llm_response(response):
|
| 168 |
# Pattern to match JSON content within triple backticks, with or without 'json' specifier
|
| 169 |
-
pattern = r
|
| 170 |
-
|
| 171 |
-
# Find all matches
|
| 172 |
-
matches = re.findall(pattern, response)
|
| 173 |
|
| 174 |
if matches:
|
| 175 |
# If we found matches, use the first one (assuming there's only one JSON block)
|
|
|
|
| 166 |
|
| 167 |
def parse_llm_response(response):
|
| 168 |
# Pattern to match JSON content within triple backticks, with or without 'json' specifier
|
| 169 |
+
pattern = r'```(?:json)?\s*([\s\S]*?)\s*```'
|
| 170 |
+
matches = re.findall(pattern, text, re.DOTALL)
|
|
|
|
|
|
|
| 171 |
|
| 172 |
if matches:
|
| 173 |
# If we found matches, use the first one (assuming there's only one JSON block)
|