We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ba2a7d commit 31a0c48Copy full SHA for 31a0c48
src/zeroband/inference/genesys/format_utils.py
@@ -37,6 +37,9 @@ def extract_last_json(completion: str) -> dict | None:
37
if json_str is None:
38
return None
39
try:
40
- return json.loads(json_str)
+ loaded_json = json.loads(json_str)
41
+ if type(loaded_json) == dict:
42
+ return loaded_json
43
+ return None
44
except json.JSONDecodeError:
45
0 commit comments