-
Notifications
You must be signed in to change notification settings - Fork 15.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
Update test_sql_database.py #17097
Update test_sql_database.py #17097
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
@@ -77,7 +77,7 @@ def test_sql_database_sequential_chain_intermediate_steps() -> None: | |||
db_chain = SQLDatabaseSequentialChain.from_llm( | |||
OpenAI(temperature=0), db, return_intermediate_steps=True | |||
) | |||
output = db_chain("What company does Harrison work at?") | |||
output = db_chain.run("What company does Harrison work at?") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We generally prefer using .invoke rather than .run now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eyurtsev, Understood, I have updated PR with .invoke now with all the found code that should be modified with the same.
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eyurtsev, I also see that a lint error comes up with this change. It seems like .invoke is expecting a non-string data type value, maybe a dict type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eyurtsev, What should we do here now, Based on the .invoke data type, .run can be implemented here. What's your suggestion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eyurtsev, Just a reminder, Should we revoke from .invoke to .run now?
In the previous function, db_chain.run is used to execute the chain, but in line number 79, only db_chain is called, which can lead to code inefficiency because it doesn't actually execute the chain. To ensure consistency, it's important to use the .run method consistently to execute the chain in all relevant parts of the code.