diff --git a/backend/app/utils/llm_client.py b/backend/app/utils/llm_client.py index 6c1a81f4..e332eebb 100644 --- a/backend/app/utils/llm_client.py +++ b/backend/app/utils/llm_client.py @@ -88,7 +88,8 @@ def chat_json( messages=messages, temperature=temperature, max_tokens=max_tokens, - response_format={"type": "json_object"} + # 不設 response_format 以相容 LM Studio / Ollama 等本地模型 + # 依賴 prompt 中的 JSON 指示 + 下方的 markdown 清理邏輯 ) # 清理markdown代码块标记 cleaned_response = response.strip()