mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-20 13:54:48 +00:00
community[patch]: compatibility with SQLAlchemy 1.4.x (#17954)
**Description:** Change type hint on `QuerySQLDataBaseTool` to be compatible with SQLAlchemy v1.4.x. **Issue:** Users locked to `SQLAlchemy < 2.x` are unable to import `QuerySQLDataBaseTool`. closes https://github.com/langchain-ai/langchain/issues/17819 **Dependencies:** None
This commit is contained in:
parent
e237dcec91
commit
d068e8ea54
@ -44,7 +44,7 @@ class QuerySQLDataBaseTool(BaseSQLDatabaseTool, BaseTool):
|
||||
self,
|
||||
query: str,
|
||||
run_manager: Optional[CallbackManagerForToolRun] = None,
|
||||
) -> Union[str, Sequence[Dict[str, Any]], Result[Any]]:
|
||||
) -> Union[str, Sequence[Dict[str, Any]], Result]:
|
||||
"""Execute the query, return the results or an error message."""
|
||||
return self.db.run_no_throw(query)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user