fix: skip LLM thesis rewrite for informational/suppressed recs to prevent queue buildup
This commit is contained in:
@@ -808,9 +808,10 @@ async def generate_recommendation(
|
|||||||
invalidation_conditions=result.invalidation_conditions,
|
invalidation_conditions=result.invalidation_conditions,
|
||||||
)
|
)
|
||||||
|
|
||||||
# 5. Optional LLM thesis rewrite
|
# 5. Optional LLM thesis rewrite — only for trading-eligible recommendations
|
||||||
|
# to avoid the LLM bottleneck on informational/suppressed recs.
|
||||||
llm_thesis: str | None = None
|
llm_thesis: str | None = None
|
||||||
if ollama_config is not None:
|
if ollama_config is not None and result.eligible and not suppression.suppressed:
|
||||||
deterministic_thesis = build_thesis(summary, result, projection=effective_projection)
|
deterministic_thesis = build_thesis(summary, result, projection=effective_projection)
|
||||||
llm_thesis = await rewrite_thesis_with_llm(
|
llm_thesis = await rewrite_thesis_with_llm(
|
||||||
deterministic_thesis=deterministic_thesis,
|
deterministic_thesis=deterministic_thesis,
|
||||||
|
|||||||
Reference in New Issue
Block a user