fix(platform_ability): 文档提取调用接辅助模型链(purpose=utility)+超时300秒——根治9月4日提取超时失败(端点默认60秒跑不完4.8万字符文档)
This commit is contained in:
parent
495592dee5
commit
7629da8b8b
@ -255,10 +255,13 @@ async def _h_extract_llm_api_spec(sor, params, ctx):
|
||||
return "文档文本太短(<100字符),无法提取配置——先用 fetch_model_doc 抓取"
|
||||
try:
|
||||
from pipeline_service.llm_bridge import llm_call_msgs
|
||||
# purpose='utility':辅助任务走辅助模型链(机构策略配置则优先,便宜快)
|
||||
# timeout=300:长文档提取慢,端点默认 60 秒实测跑不完(2026-09-04 根因)
|
||||
raw = await llm_call_msgs(
|
||||
[{"role": "system", "content": _EXTRACT_PROMPT},
|
||||
{"role": "user", "content": doc_text[:48000]}],
|
||||
temperature=0.1, org_id="0", user_id=ctx.get("user_id", ""))
|
||||
temperature=0.1, org_id="0", user_id=ctx.get("user_id", ""),
|
||||
purpose="utility", timeout=300)
|
||||
except Exception as e:
|
||||
return "LLM 提取失败:%s" % str(e)[:200]
|
||||
txt = (raw or "").strip()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user