-
Notifications
You must be signed in to change notification settings - Fork 13.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot specify max iterations when using create_json_agent #3429
Comments
+1
|
Facing the same issue, max_iterations not getting respected when using it in AgentExecutor.from_agent_and_tools Any solution to this? |
This is working fine for me: json_agent_executor = create_json_agent(llm=llm, toolkit=json_toolkit, agent_executor_kwargs={'max_iterations':100, 'max_execution_time':60*5, 'early_stopping_method':'generate'}, verbose=True) |
Hi, @paulbatum, I'm helping the LangChain team manage their backlog and am marking this issue as stale. It seems that the issue you reported regarding the max_iterations not taking effect when using create_json_agent has not been resolved yet. Other users have also experienced the same issue and are looking for a solution. One user, benbaker76, has shared a code snippet that seems to be working for them. Could you please confirm if this issue is still relevant to the latest version of the LangChain repository? If it is, please let the LangChain team know by commenting on the issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days. Thank you! |
Specifying max_iterations does not take effect when using create_json_agent. The following code is from this page, with max_iterations added:
The output consists of more than 3 iterations:
Maybe kwargs need to be passed in to
from_agent_and_tools
?https://github.com/hwchase17/langchain/blob/0cf934ce7d8150dddf4a2514d6e7729a16d55b0f/langchain/agents/agent_toolkits/json/base.py#L41-L43
The text was updated successfully, but these errors were encountered: