Skip to content

Instantly share code, notes, and snippets.

View ZaneH's full-sized avatar
🎩
Top of the morning to ya

Zane Helton ZaneH

🎩
Top of the morning to ya
View GitHub Profile
@ZaneH
ZaneH / fixjson.py
Created February 27, 2024 06:53 — forked from trotsky1997/fixjson.py
Fix JSON output of LLM agents
import re
import json
from half_json.core import JSONFixer
def json_fixer(data: str) -> str:
# define a mapping of full-width punctuation to half-width punctuation
punctuation_map = {
"!": "!",