From 839cdbdbc780980c1fcfb8733a68808a9fb8f614 Mon Sep 17 00:00:00 2001 From: konjacpotato Date: Wed, 25 Feb 2026 20:57:16 +0800 Subject: [PATCH] llm change to qwen3.5 --- llm/llm_thinking_engine.py | 4 ++-- task/hot_topic/real_estate_story.py | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/llm/llm_thinking_engine.py b/llm/llm_thinking_engine.py index 6b64c0e..0f87658 100644 --- a/llm/llm_thinking_engine.py +++ b/llm/llm_thinking_engine.py @@ -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: diff --git a/task/hot_topic/real_estate_story.py b/task/hot_topic/real_estate_story.py index 6cb1a2e..6d5189a 100644 --- a/task/hot_topic/real_estate_story.py +++ b/task/hot_topic/real_estate_story.py @@ -131,7 +131,11 @@ def story_edit_task(): logger.warning(f"story_edit_task content id: {content.id} llm生成的结果不是有效的json格式,无法解析故事内容") continue # 将生成的故事写入Article表 - json_story = json.loads(story) + 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表 - json_story = json.loads(story) + 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)