Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion backend/app/utils/llm_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down