题意:
在LangGraph代理执行中间歇性出现UnboundLocalError
问题背景:
I'm experiencing an intermittent error in my LangGraph-based agent system. The error occurs in my main agent class, which uses other custom agents as its tools. The error doesn't happen every time, but it occurs frequently enough to be a significant issue.
我在基于LangGraph的代理系统中遇到了间歇性错误。该错误发生在我的主代理类中,该类将其他自定义代理作为工具使用。错误不是每次都会发生,但发生的频率足够高,已经成为一个显著的问题。
Here's the error I'm seeing:
这是我看到的错误:
An error occurred: local variable 'fut' referenced before assignment
Traceback (most recent call last):
...
File "/Users/yosef/uni/Uni chat store/llm/agents.py", line 326, in run
return self.build().graph.invoke({'