mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-28 16:07:46 +00:00
feat: enhance timeout management and knowledge base handling in CoSTEER components (#1130)
* feat: enhance timeout management and knowledge base handling in CoSTEER components * fix a little bug * fix small bug * fix a small bug * Update rdagent/scenarios/data_science/loop.py Co-authored-by: you-n-g <you-n-g@users.noreply.github.com> * add scale check * fix a small bug * fix CI * use dynamic chat_token_limit & remove repeated lines * fix CI * remove useless comment * fix small bug * update draft appendix * fix prompt * add code correctness as top priority --------- Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>
This commit is contained in:
@@ -103,7 +103,7 @@ class FactorCodeEvaluator(FactorEvaluator):
|
||||
user_prompt=user_prompt,
|
||||
system_prompt=system_prompt,
|
||||
)
|
||||
> LLM_SETTINGS.chat_token_limit
|
||||
> APIBackend().chat_token_limit
|
||||
):
|
||||
execution_feedback_to_render = execution_feedback_to_render[len(execution_feedback_to_render) // 2 :]
|
||||
else:
|
||||
@@ -509,7 +509,7 @@ class FactorFinalDecisionEvaluator(FactorEvaluator):
|
||||
user_prompt=user_prompt,
|
||||
system_prompt=system_prompt,
|
||||
)
|
||||
> LLM_SETTINGS.chat_token_limit
|
||||
> APIBackend().chat_token_limit
|
||||
):
|
||||
execution_feedback_to_render = execution_feedback_to_render[len(execution_feedback_to_render) // 2 :]
|
||||
else:
|
||||
|
||||
@@ -45,7 +45,7 @@ class FactorMultiProcessEvolvingStrategy(MultiProcessEvolvingStrategy):
|
||||
APIBackend().build_messages_and_calculate_token(
|
||||
user_prompt=error_summary_user_prompt, system_prompt=error_summary_system_prompt
|
||||
)
|
||||
< LLM_SETTINGS.chat_token_limit
|
||||
< APIBackend().chat_token_limit
|
||||
):
|
||||
break
|
||||
elif len(queried_similar_error_knowledge_to_render) > 0:
|
||||
@@ -124,7 +124,7 @@ class FactorMultiProcessEvolvingStrategy(MultiProcessEvolvingStrategy):
|
||||
)
|
||||
if (
|
||||
APIBackend().build_messages_and_calculate_token(user_prompt=user_prompt, system_prompt=system_prompt)
|
||||
< LLM_SETTINGS.chat_token_limit
|
||||
< APIBackend().chat_token_limit
|
||||
):
|
||||
break
|
||||
elif len(queried_former_failed_knowledge_to_render) > 1:
|
||||
|
||||
Reference in New Issue
Block a user