llm change to qwen3.5
All checks were successful
Gitea Actions Demo / deploy (push) Successful in 13m51s
All checks were successful
Gitea Actions Demo / deploy (push) Successful in 13m51s
This commit is contained in:
@ -11,10 +11,10 @@ class LLMConfig:
|
|||||||
"""LLM配置类"""
|
"""LLM配置类"""
|
||||||
api_key: Optional[str] = None
|
api_key: Optional[str] = None
|
||||||
base_url: str = "https://dashscope.aliyuncs.com/compatible-mode/v1"
|
base_url: str = "https://dashscope.aliyuncs.com/compatible-mode/v1"
|
||||||
model: str = "deepseek-v3.2"
|
model: str = "qwen3.5-plus"
|
||||||
enable_thinking: bool = True
|
enable_thinking: bool = True
|
||||||
temperature: float = 0.7
|
temperature: float = 0.7
|
||||||
max_tokens: int = 2048
|
max_tokens: int = 4096
|
||||||
|
|
||||||
|
|
||||||
class LLMThinkingEngine:
|
class LLMThinkingEngine:
|
||||||
|
|||||||
@ -131,7 +131,11 @@ def story_edit_task():
|
|||||||
logger.warning(f"story_edit_task content id: {content.id} llm生成的结果不是有效的json格式,无法解析故事内容")
|
logger.warning(f"story_edit_task content id: {content.id} llm生成的结果不是有效的json格式,无法解析故事内容")
|
||||||
continue
|
continue
|
||||||
# 将生成的故事写入Article表
|
# 将生成的故事写入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", "无标题")
|
title = json_story.get("title", "无标题")
|
||||||
paragraphs = json_story.get("body", ["无内容"])
|
paragraphs = json_story.get("body", ["无内容"])
|
||||||
article_content = "\n".join(paragraphs)
|
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格式,无法解析故事内容")
|
logger.warning(f"story_edit_task content id: {content.id} llm生成的结果不是有效的json格式,无法解析故事内容")
|
||||||
continue
|
continue
|
||||||
# 将生成的故事写入Article表
|
# 将生成的故事写入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", "无标题")
|
title = json_story.get("title", "无标题")
|
||||||
paragraphs = json_story.get("body", ["无内容"])
|
paragraphs = json_story.get("body", ["无内容"])
|
||||||
article_content = "\n".join(paragraphs)
|
article_content = "\n".join(paragraphs)
|
||||||
|
|||||||
Reference in New Issue
Block a user