The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
community[patch]: Fix sql_databse.from_databricks issue when ran from Job (#23224)
Luis Morosd5be160af0eb
diff --git a/libs/community/langchain_community/utilities/sql_database.py b/libs/community/langchain_community/utilities/sql_database.pyindex fa57ea60ff..dfc24ed626 100644--- a/libs/community/langchain_community/utilities/sql_database.py+++ b/libs/community/langchain_community/utilities/sql_database.py@@ -201,10 +201,10 @@ class SQLDatabase:from dbruntime.databricks_repl_context import get_contextcontext = get_context()+ default_host = context.browserHostNameexcept ImportError:- pass+ default_host = None- default_host = context.browserHostName if context else Noneif host is None:host = get_from_env("host", "DATABRICKS_HOST", default_host)