feat(llm): add json_output support for structured LLM responses

This commit is contained in:
Timebomb2018
2026-04-16 16:27:55 +08:00
parent 5ce0bdb0f5
commit 8c6b65db12
23 changed files with 304 additions and 110 deletions

View File

@@ -250,7 +250,8 @@ class SharedChatService:
tools=tools,
deep_thinking=model_parameters.get("deep_thinking", False),
thinking_budget_tokens=model_parameters.get("thinking_budget_tokens"),
capability=api_key_obj.capability or [],
json_output=model_parameters.get("json_output", False),
capability=api_key_obj.capability,
)
# 加载历史消息
@@ -455,6 +456,7 @@ class SharedChatService:
streaming=True,
deep_thinking=model_parameters.get("deep_thinking", False),
thinking_budget_tokens=model_parameters.get("thinking_budget_tokens"),
json_output=model_parameters.get("json_output", False),
capability=api_key_obj.capability or [],
)