Fix writer max_tokens (500→1000) for titles/tags, fix preview scrollbar height
This commit is contained in:
+2
-2
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user