Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions application/nlq/core/state_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
generate_suggested_question, get_agent_cot_task
from utils.opensearch import get_retrieve_opensearch
from utils.text_search import entity_retrieve_search, qa_retrieve_search, agent_text_search
from utils.tool import get_generated_sql
from utils.tool import get_generated_sql, get_generated_sql_explain

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -370,7 +370,7 @@ def handle_execute_query(self):
sql, response = self._generate_sql_again()
sql_execute_result = self._execute_sql(sql)
self.answer.sql_search_result.sql = sql
self.answer.sql_search_result.sql_gen_process = get_generated_sql(response)
self.answer.sql_search_result.sql_gen_process = get_generated_sql_explain(response)
self.intent_search_result["sql_execute_result"] = sql_execute_result
self.answer.sql_search_result.sql_data = sql_execute_result["data"]
if self.context.data_with_analyse and sql_execute_result["status_code"] == 200:
Expand Down
2 changes: 1 addition & 1 deletion application/pages/1_🌍_Generative_BI_Playground.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ def main():
status_text.update(
label=f"Generating SQL Done",
state="complete", expanded=True)
if state_machine.context.gen_suggested_question_flag:
if state_machine.context.explain_gen_process_flag:
with st.status("Generating explanations...") as status_text:
st.markdown(state_machine.get_answer().sql_search_result.sql_gen_process)
status_text.update(
Expand Down