Fix writer max_tokens (500→1000) for titles/tags, fix preview scrollbar height

This commit is contained in:
Yuzhiran Dev
2026-05-19 07:44:56 +08:00
parent 0897074d40
commit 3dce54b359
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -246,7 +246,7 @@ class Writer:
if HAVE_LLM:
prompt = tag_prompts.get(platform, f"根据文章信息生成适合{platform}的标签。标题:{title} 领域:{field} 核心观点:{core} 直接输出标签,空格分隔。")
try:
tags_text = call_llm(prompt, temperature=0.2, max_tokens=500)
tags_text = call_llm(prompt, temperature=0.2, max_tokens=1000)
if tags_text:
tags = [t.strip('#') for t in tags_text.strip().split() if t.strip('#')]
if tags:
@@ -342,7 +342,7 @@ class Writer:
prompt = title_templates.get(platform, f"给以下文章改个吸引人的{platform}标题:{original}")
try:
resp = call_llm(prompt, temperature=0.7, max_tokens=500)
resp = call_llm(prompt, temperature=0.7, max_tokens=1000)
titles = []
for line in resp.strip().split('\n'):
line = line.strip()