update map

This commit is contained in:
bridge
2025-10-09 01:05:34 +08:00
parent 3095f18303
commit 2e2b1a0dae
8 changed files with 136 additions and 29 deletions

View File

@@ -150,14 +150,9 @@ def parse_llm_response(res: str) -> dict:
pass
# 3) 整体 json5 兜底
try:
obj = json5.loads(res)
if isinstance(obj, dict):
return obj
except Exception:
pass
obj = json5.loads(res)
return obj
raise ValueError("无法从LLM响应中解析出有效的JSON字典对象")
def get_prompt_and_call_llm(template_path: Path, infos: dict, mode="normal") -> str:
"""