From c233c59590bb636f3d4de92b21776ea845b3049d Mon Sep 17 00:00:00 2001 From: David Loving <107890550+Davidkloving@users.noreply.github.com> Date: Thu, 22 Feb 2024 09:39:53 -0600 Subject: [PATCH] Support compatibility with SQLAlchemy 1.4.x --- libs/community/langchain_community/tools/sql_database/tool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/community/langchain_community/tools/sql_database/tool.py b/libs/community/langchain_community/tools/sql_database/tool.py index e68923bdcfbd3..9d4f90b72454f 100644 --- a/libs/community/langchain_community/tools/sql_database/tool.py +++ b/libs/community/langchain_community/tools/sql_database/tool.py @@ -44,7 +44,7 @@ def _run( 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)