(self)
| 14 | """extract_json — extract a JSON object from LLM response text.""" |
| 15 | |
| 16 | def test_code_fence_json(self) -> None: |
| 17 | text = 'Some text\n```json\n{"key": "value", "num": 42}\n```\nmore text' |
| 18 | assert extract_json(text) == {"key": "value", "num": 42} |
| 19 | |
| 20 | def test_bare_json_object(self) -> None: |
| 21 | text = 'The result is {"answer": "yes", "score": 0.95}.' |
nothing calls this directly
no test coverage detected