MCPcopy Create free account
hub / github.com/OpenBMB/ChatDev / _before_sleep

Method _before_sleep

runtime/node/executor/agent_executor.py:409–423  ·  view source on GitHub ↗
(retry_state)

Source from the content-addressed store, hash-verified

407 retry_condition = retry_if_exception(lambda exc: retry_config.should_retry(exc))
408
409 def _before_sleep(retry_state) -> None:
410 exc = retry_state.outcome.exception()
411 if exc is None:
412 return
413 attempt = retry_state.attempt_number
414 details = {
415 "attempt": attempt,
416 "max_attempts": retry_config.max_attempts,
417 "exception": exc.__class__.__name__,
418 }
419 self.log_manager.warning(
420 f"[Node: {node.id}] Model call attempt {attempt} failed: {exc}",
421 node_id=node.id,
422 details=details,
423 )
424
425 retrier = Retrying(
426 stop=stop_after_attempt(retry_config.max_attempts),

Callers

nothing calls this directly

Calls 1

warningMethod · 0.45

Tested by

no test coverage detected