Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two optimizations: log and allow_llm_to_see_data #454

Merged
merged 3 commits into from
Jun 7, 2024
Merged

Two optimizations: log and allow_llm_to_see_data #454

merged 3 commits into from
Jun 7, 2024

Conversation

peilongchencc
Copy link
Contributor

Optimize the usage of title in the log function within base.py:

I noticed that the title variable in the log function is not actually used. For example:

    def log(self, message: str, title: str = "Info"):
        print(message)
self.log(title="LLM Response", message=llm_response)

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.

@zyclove
Copy link
Contributor

zyclove commented May 28, 2024

relation: #435

@zainhoda zainhoda merged commit 202d730 into vanna-ai:main Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants