You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To address the issue of calling a synchronous function within an asynchronous context in the React Worker, you should switch from using _process_actions to its asynchronous counterpart _aprocess_actions. This change is necessary to maintain the asynchronous execution flow and avoid errors related to mixing synchronous and asynchronous calls.
Here's the specific change you need to make in your code:
By making this change, you ensure that the execution remains within the asynchronous context, leveraging the await keyword for the _aprocess_actions method. This method is designed for asynchronous operation, aligning with the asynchronous workflow requirements and preventing the issues you've encountered.
If you have any more questions or need further assistance, feel free to ask.
Bug Description
The React Worker calls sync
_process_actions
inside async_arun_step_stream
llama_index/llama-index-core/llama_index/core/agent/react/step.py
Line 701 in cc77487
even when there is the async counterpart
_aprocess_actions
. This causes errors downstream as the tools are called sync instead of being async.Version
0.10.28
Steps to Reproduce
llama_index/llama-index-core/llama_index/core/agent/react/step.py
Line 701 in cc77487
Relevant Logs/Tracbacks
No response
The text was updated successfully, but these errors were encountered: