(text)
| 9 | |
| 10 | |
| 11 | def extract_json_from_markdown(text): |
| 12 | # Match ```json ... ``` or ``` ... ``` |
| 13 | match = re.search(r"```(?:json)?\s*(\{.*?\})\s*```", text, re.DOTALL) |
| 14 | if match: |
| 15 | return match.group(1) |
| 16 | return text |
| 17 | |
| 18 | |
| 19 | def extract_answer_from_response(response): |
no outgoing calls
no test coverage detected