mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-02 07:42:40 +00:00
Fixed core invoke loop logic and relevant tests (#1865)
* Fixed core invoke loop logic and relevant tests * Fix failing tests * Clean up final print statements * Additional clean up for PR review
This commit is contained in:
committed by
GitHub
parent
b3504e768c
commit
2131b94ddb
@@ -19,15 +19,10 @@ class CrewAgentExecutorMixin:
|
||||
agent: Optional["BaseAgent"]
|
||||
task: Optional["Task"]
|
||||
iterations: int
|
||||
have_forced_answer: bool
|
||||
max_iter: int
|
||||
_i18n: I18N
|
||||
_printer: Printer = Printer()
|
||||
|
||||
def _should_force_answer(self) -> bool:
|
||||
"""Determine if a forced answer is required based on iteration count."""
|
||||
return (self.iterations >= self.max_iter) and not self.have_forced_answer
|
||||
|
||||
def _create_short_term_memory(self, output) -> None:
|
||||
"""Create and save a short-term memory item if conditions are met."""
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user