feat(custom.py): pass llm parameter to SQLDatabaseToolkit constructor
This commit is contained in:
parent
5610073386
commit
f00420ecbe
1 changed files with 1 additions and 1 deletions
|
|
@ -174,7 +174,7 @@ class SQLAgent(AgentExecutor):
|
|||
def from_toolkit_and_llm(cls, llm: BaseLLM, database_uri: str, **kwargs: Any):
|
||||
"""Construct a sql agent from an LLM and tools."""
|
||||
db = SQLDatabase.from_uri(database_uri)
|
||||
toolkit = SQLDatabaseToolkit(db=db)
|
||||
toolkit = SQLDatabaseToolkit(db=db, llm=llm)
|
||||
|
||||
# The right code should be this, but there is a problem with tools = toolkit.get_tools()
|
||||
# related to `OPENAI_API_KEY`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue