(response)
| 83 | |
| 84 | |
| 85 | def get_json_content(response): |
| 86 | start_idx = response.find("```json") |
| 87 | if start_idx != -1: |
| 88 | start_idx += 7 |
| 89 | response = response[start_idx:] |
| 90 | |
| 91 | end_idx = response.rfind("```") |
| 92 | if end_idx != -1: |
| 93 | response = response[:end_idx] |
| 94 | |
| 95 | json_content = response.strip() |
| 96 | return json_content |
| 97 | |
| 98 | |
| 99 | def extract_json(content): |