Additional clean up for PR review

This commit is contained in:
Brandon Hancock
2025-01-08 11:41:36 -05:00
parent 0b57f04e52
commit fc90610627
2 changed files with 0 additions and 8 deletions

View File

@@ -32,9 +32,6 @@ class RPMController(BaseModel):
return True return True
def _check_and_increment(): def _check_and_increment():
print(
f"self.max_rpm: {self.max_rpm}, self._current_rpm: {self._current_rpm}"
)
if self.max_rpm is not None and self._current_rpm < self.max_rpm: if self.max_rpm is not None and self._current_rpm < self.max_rpm:
self._current_rpm += 1 self._current_rpm += 1
return True return True

View File

@@ -565,7 +565,6 @@ def test_agent_moved_on_after_max_iterations():
task=task, task=task,
tools=[get_final_answer], tools=[get_final_answer],
) )
print("output:", output)
assert output == "42" assert output == "42"
@@ -575,7 +574,6 @@ def test_agent_respect_the_max_rpm_set(capsys):
def get_final_answer() -> float: def get_final_answer() -> float:
"""Get the final answer but don't give it yet, just re-use this """Get the final answer but don't give it yet, just re-use this
tool non-stop.""" tool non-stop."""
return 42
agent = Agent( agent = Agent(
role="test role", role="test role",
@@ -666,7 +664,6 @@ def test_agent_without_max_rpm_respects_crew_rpm(capsys):
role="test role2", role="test role2",
goal="test goal2", goal="test goal2",
backstory="test backstory2", backstory="test backstory2",
# Increase max_iter to ensure the agent exceeds the RPM limit
max_iter=5, max_iter=5,
verbose=True, verbose=True,
allow_delegation=False, allow_delegation=False,
@@ -697,9 +694,7 @@ def test_agent_without_max_rpm_respects_crew_rpm(capsys):
moveon.return_value = True moveon.return_value = True
crew.kickoff() crew.kickoff()
captured = capsys.readouterr() captured = capsys.readouterr()
print("captured:", captured.out)
assert "get_final_answer" in captured.out assert "get_final_answer" in captured.out
# Now the agent should have exceeded the RPM limit and triggered the wait
assert "Max RPM reached, waiting for next minute to start." in captured.out assert "Max RPM reached, waiting for next minute to start." in captured.out
moveon.assert_called_once() moveon.assert_called_once()