mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-20 19:55:25 -04:00
fix: respect user round count in deep research (#2896)
The STOP_PROMPT did not include the target round count, so the LLM could decide to stop after 2-3 rounds even when the user requested 8. Additionally, min_rounds was capped at 3 regardless of max_rounds. - Add max_rounds to STOP_PROMPT so the LLM knows the target - Change min_rounds from min(3, max_rounds) to max(2, max_rounds - 2) Fixes #2863 Co-authored-by: michaelxer <michaelxer@users.noreply.github.com>
This commit is contained in:
@@ -777,7 +777,7 @@ class ResearchHandler:
|
||||
llm_model=llm_model,
|
||||
llm_headers=llm_headers,
|
||||
max_rounds=max_rounds,
|
||||
min_rounds=min(3, max_rounds),
|
||||
min_rounds=max(2, max_rounds - 2),
|
||||
max_time=max_time,
|
||||
max_report_tokens=_max_report_tokens,
|
||||
extraction_timeout=_extraction_timeout,
|
||||
|
||||
Reference in New Issue
Block a user