fix: max_tokens下限512(OCG对小max_tokens短路返回空)
This commit is contained in:
@@ -187,6 +187,9 @@ def call_llm(prompt, model=None, max_tokens=4096, timeout=150,
|
||||
永远不抛异常到调用方。
|
||||
"""
|
||||
model_name = model or REASSESS_MODEL
|
||||
# OCG/deepseek 对过小 max_tokens 会短路返回空(2026-07-22 实测 max_tokens=64 必空)
|
||||
if max_tokens < 512:
|
||||
max_tokens = 512
|
||||
messages = []
|
||||
if system:
|
||||
messages.append({"role": "system", "content": system})
|
||||
|
||||
Reference in New Issue
Block a user