langchain
langchain copied to clipboard
Gfrenkel/sql columns option
Add column names to SQLDatabase.run() result
Description: Current state: SQLDatabase.run() method returns a result from the database after executing a SQL query but there is no option of adding the column names as well to the returned result.
PR offer the following solution:
Adding a argument "include_column_names_on_query" to the SQLDatabase constructor. By default, this argument will be set to False, but when set to True, SQLDatabase.run() method will add the column names to the result (if the result is not empty).
Would love to hear some feedback!
- @hwchase17
- @vowelparrot
i tried to resolve merge conflicts with master, i think i did it okay?
@hwchase17 Yup! Looks great! Had to make an important fix.. see last commit (dumb mistake on my end)
@hwchase17 There was a formatting issue in the lint workflow fixed that (last commit)
@Gil-Frenkel Hi , could you, please, resolve the merging issues? After that ping me and I push this PR for the review. Thanks!
Closing because the PR wouldn't line up with the current directory structure of the library (would need to be in /libs/langchain/langchain instead of /langchain). Feel free to reopen against the current head if it's still relevant!