Skip to content

Commit

Permalink
Merge pull request #454 from peilongchencc/main
Browse files Browse the repository at this point in the history
Two optimizations: log and allow_llm_to_see_data
  • Loading branch information
zainhoda authored Jun 7, 2024
2 parents fdcb93d + 68e2a26 commit 202d730
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/vanna/base/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def __init__(self, config=None):
self.max_tokens = self.config.get("max_tokens", 14000)

def log(self, message: str, title: str = "Info"):
print(message)
print(f"{title}: {message}")

def _response_language(self) -> str:
if self.language is None:
Expand Down Expand Up @@ -1596,6 +1596,7 @@ def ask(
print_results: bool = True,
auto_train: bool = True,
visualize: bool = True, # if False, will not generate plotly code
allow_llm_to_see_data: bool = False,
) -> Union[
Tuple[
Union[str, None],
Expand Down Expand Up @@ -1626,7 +1627,7 @@ def ask(
question = input("Enter a question: ")

try:
sql = self.generate_sql(question=question)
sql = self.generate_sql(question=question, allow_llm_to_see_data=allow_llm_to_see_data)
except Exception as e:
print(e)
return None, None, None
Expand Down

0 comments on commit 202d730

Please sign in to comment.