Spaces:
Sleeping
Sleeping
deploy: sync agent updates to Hugging Face Space
Browse files132 unmodified lines133134135136137138132 unmodified linesdef _parse_anchor_json(content: str) -> dict:"""清洗大模型输出并解析 JSON"""cleaned = re.sub(r"^```json\s*", "", content.strip(), flags=re.IGNORECASE)cleaned = re.sub(r"^```\s*", "", cleaned, flags=re.IGNORECASE)cleaned = re.sub(r"```$", "", cleaned.strip(), flags=re.IGNORECASE)132 unmodified lines133134135136137138139140141142132 unmodified linesdef _parse_anchor_json(content: str) -> dict:"""清洗大模型输出并解析 JSON"""# 移除思考模块content = re.sub(r"<thought>.*?</thought>", "", content, flags=re.DOTALL | re.IGNORECASE)content = re.sub(r"<think>.*?</think>", "", content, flags=re.DOTALL | re.IGNORECASE)cleaned = re.sub(r"^```json\s*", "", content.strip(), flags=re.IGNORECASE)cleaned = re.sub(r"^```\s*", "", cleaned, flags=re.IGNORECASE)cleaned = re.sub(r"```$", "", cleaned.strip(), flags=re.IGNORECASE)
nodes/anchor_locator.py+4