Skip to content

Commit

Permalink
Fix generate_sql
Browse files Browse the repository at this point in the history
  • Loading branch information
zainhoda authored Mar 27, 2024
1 parent e470dec commit e78cabb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/vanna/base/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ def generate_sql(self, question: str, **kwargs) -> str:
Returns:
str: The SQL query that answers the question.
"""
initial_prompt = self.config.get("initial_prompt", None)
if self.config is not None:
initial_prompt = self.config.get("initial_prompt", None)
else:
initial_prompt = None
question_sql_list = self.get_similar_question_sql(question, **kwargs)
ddl_list = self.get_related_ddl(question, **kwargs)
doc_list = self.get_related_documentation(question, **kwargs)
Expand Down

0 comments on commit e78cabb

Please sign in to comment.