Skip to content

Conversation

@zachdj
Copy link
Contributor

@zachdj zachdj commented Apr 3, 2023

Currently, agent_toolkits.sql.create_sql_agent() passes kwargs to the ZeroShotAgent that it creates but not to AgentExecutor that it also creates. This prevents the caller from providing some useful arguments like max_iterations and early_stopping_method

This PR changes create_sql_agent so that it passes kwargs to both constructors.

@zachdj
Copy link
Contributor Author

zachdj commented Apr 3, 2023

I saw in #2285 it was preferable to add the desired args to the method signature instead of sending kwargs to two different constructors. Would that be a better approach here as well?

@hwchase17
Copy link
Contributor

I saw in #2285 it was preferable to add the desired args to the method signature instead of sending kwargs to two different constructors. Would that be a better approach here as well?

yes! to avoid confusion about where to pass things

other than that, love this - thanks

@zachdj
Copy link
Contributor Author

zachdj commented Apr 4, 2023

yes! to avoid confusion about where to pass things

Thanks for the quick reply! Done!

@hwchase17 hwchase17 merged commit c969a77 into langchain-ai:master Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants