llm change to qwen3.5
All checks were successful
Gitea Actions Demo / deploy (push) Successful in 13m51s

This commit is contained in:
2026-02-25 20:57:16 +08:00
parent c1e5db64c1
commit 839cdbdbc7
2 changed files with 12 additions and 4 deletions

View File

@ -11,10 +11,10 @@ class LLMConfig:
"""LLM配置类"""
api_key: Optional[str] = None
base_url: str = "https://dashscope.aliyuncs.com/compatible-mode/v1"
model: str = "deepseek-v3.2"
model: str = "qwen3.5-plus"
enable_thinking: bool = True
temperature: float = 0.7
max_tokens: int = 2048
max_tokens: int = 4096
class LLMThinkingEngine:

View File

@ -131,7 +131,11 @@ def story_edit_task():
logger.warning(f"story_edit_task content id: {content.id} llm生成的结果不是有效的json格式无法解析故事内容")
continue
# 将生成的故事写入Article表
try:
json_story = json.loads(story)
except json.JSONDecodeError:
logger.warning(f"story_edit_task content id: {content.id} llm生成的故事内容不是有效的json格式无法解析故事内容")
continue
title = json_story.get("title", "无标题")
paragraphs = json_story.get("body", ["无内容"])
article_content = "\n".join(paragraphs)
@ -163,7 +167,11 @@ def story_edit_task():
logger.warning(f"story_edit_task content id: {content.id} llm生成的结果不是有效的json格式无法解析故事内容")
continue
# 将生成的故事写入Article表
try:
json_story = json.loads(story)
except json.JSONDecodeError:
logger.warning(f"story_edit_task content id: {content.id} llm生成的故事内容不是有效的json格式无法解析故事内容")
continue
title = json_story.get("title", "无标题")
paragraphs = json_story.get("body", ["无内容"])
article_content = "\n".join(paragraphs)