🐛 fix(custom.py): rename QueryCheckerTool to QuerySQLCheckerTool to match the correct class name

The QueryCheckerTool class was renamed to QuerySQLCheckerTool to match the correct class name. This change ensures that the correct class is being used and avoids any potential errors that may arise from using the wrong class name.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-06-21 16:08:37 -03:00
commit 10db240a6b

View file

@ -192,7 +192,7 @@ class SQLAgent(CustomAgentExecutor):
from langchain.tools.sql_database.tool import (
InfoSQLDatabaseTool,
ListSQLDatabaseTool,
QueryCheckerTool,
QuerySQLCheckerTool,
QuerySQLDataBaseTool,
)
@ -207,7 +207,7 @@ class SQLAgent(CustomAgentExecutor):
QuerySQLDataBaseTool(db=db), # type: ignore
InfoSQLDatabaseTool(db=db), # type: ignore
ListSQLDatabaseTool(db=db), # type: ignore
QueryCheckerTool(db=db, llm_chain=llmchain, llm=llm), # type: ignore
QuerySQLCheckerTool(db=db, llm_chain=llmchain, llm=llm), # type: ignore
]
prefix = SQL_PREFIX.format(dialect=toolkit.dialect, top_k=10)