Closed timothyvinzent closed 5 months ago
Hmm it calls each tool twice. I think I can guess the cause. Great catch!
See this code block. It has try/except, but the tool is called in try and in except. We should move the call outside the try/except block.
Hi all, I know ReAct is due for some improvement as mentioned in previous issues. #748 #703
However, I've built a ReAct agent for process mining QA with two custom tools at its disposal (text-to-SQL for retrieval and executing python code to enrich/add new columns to the DB). Running on OAI gpt3.5 in chat mode. Everytime it calls any of the tools in Action step, regardless of the iteration it will call the tool twice, which is kind of a problem when it has already executed the python code to add a column to the DB. Is this a bug in ReAct behavior, or have I just implemented it wrong? Since none of the documentation really goes into this use-case I wanted to ask and share.
Code for the ReAct Agent:
Code for text-to-SQL tool:
Code for python code exec: