Fix variable reference.
This commit is contained in:
parent
408eff73a9
commit
8018bce252
|
|
@ -459,12 +459,12 @@ def run_agent_with_retry(agent, prompt: str, config: dict) -> Optional[str]:
|
||||||
|
|
||||||
with InterruptibleSection():
|
with InterruptibleSection():
|
||||||
try:
|
try:
|
||||||
logger.debug("Attempt %d/%d", attempt + 1, max_retries)
|
|
||||||
# Track agent execution depth
|
# Track agent execution depth
|
||||||
current_depth = _global_memory.get('agent_depth', 0)
|
current_depth = _global_memory.get('agent_depth', 0)
|
||||||
_global_memory['agent_depth'] = current_depth + 1
|
_global_memory['agent_depth'] = current_depth + 1
|
||||||
|
|
||||||
for attempt in range(max_retries):
|
for attempt in range(max_retries):
|
||||||
|
logger.debug("Attempt %d/%d", attempt + 1, max_retries)
|
||||||
check_interrupt()
|
check_interrupt()
|
||||||
try:
|
try:
|
||||||
for chunk in agent.stream({"messages": [HumanMessage(content=prompt)]}, config):
|
for chunk in agent.stream({"messages": [HumanMessage(content=prompt)]}, config):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue