mirror of
https://github.com/Mintplex-Labs/langchain-python.git
synced 2026-07-19 13:26:32 -04:00
Replaced SQLDatabaseChain deprecated direct initialisation with from_llm method (#4778)
# Removed usage of deprecated methods Replaced `SQLDatabaseChain` deprecated direct initialisation with `from_llm` method ## Who can review? @hwchase17 @agola11 --------- Co-authored-by: imeckr <chandanroutray2012@gmail.com> Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
This commit is contained in:
@@ -223,8 +223,8 @@ class SQLDatabaseSequentialChain(Chain):
|
||||
**kwargs: Any,
|
||||
) -> SQLDatabaseSequentialChain:
|
||||
"""Load the necessary chains."""
|
||||
sql_chain = SQLDatabaseChain(
|
||||
llm=llm, database=database, prompt=query_prompt, **kwargs
|
||||
sql_chain = SQLDatabaseChain.from_llm(
|
||||
llm, database, prompt=query_prompt, **kwargs
|
||||
)
|
||||
decider_chain = LLMChain(
|
||||
llm=llm, prompt=decider_prompt, output_key="table_names"
|
||||
|
||||
Reference in New Issue
Block a user