[Bug]: CodeAct Agent: cannot reuse already awaited coroutine
Describe the bug When I use CodeAct Agent to generate code and execute it, an error message appears: cannot reuse already awaited coroutine. I suspect it may be related to jupyter notebook. When I restart my project, the error still exists. I restarted my computer again, and the error still exists. Please help me analyze how to solve this problem. Thank you.
Error messages
@garyzhang99 Please take a look at this issue
Based on the information you've provided, it appears that you are calling the CodeActAgent within JupyterNotebook, which itself utilizes asyncio. Multiple calls to asyncio in this context may result in errors.
I suggest implementing the following code to potentially resolve this issue:
import nest_asyncio
nest_asyncio.apply()
Additionally, you may wish to consider running the examples directly from either:
examples/conversation_with_codeact_agent/codeact_agent_example_modeling.ipynb
or
examples/conversation_with_codeact_agent/codeact_agent_example_tools.ipynb
This might help you determine if the issue persists.