Add the parameter allow_llm_to_see_data=False to the ask function:
When I ran my code, the terminal displayed the following message:
The LLM is not allowed to see the data in your database. Your question requires database introspection to generate the necessary SQL. Please set allow_llm_to_see_data=True to enable this.
I checked the parameters of the ask function to add this parameter but found that the ask function does not have this parameter.
Instead, this parameter is used in the ask function's sql = self.generate_sql(question=question) section. Therefore, I made this modification.
Optimize the usage of
title
in thelog
function withinbase.py
:I noticed that the
title
variable in the log function is not actually used. For example:Add the parameter allow_llm_to_see_data=False to the ask function:
When I ran my code, the terminal displayed the following message:
I checked the parameters of the
ask
function to add this parameter but found that theask
function does not have this parameter.Instead, this parameter is used in the
ask
function'ssql = self.generate_sql(question=question)
section. Therefore, I made this modification.