in UI/nl2sqlstudio_ui.py [0:0]
def add_new_question() -> None:
"""
Function that is called when a new question is added to the
messae queue. This will trigger the API calls to invoke the
appropriate Executor that is selected on the Sidebar panel
"""
if 'new_question' in st.session_state:
redraw()
st.session_state.refresh = False
if st.session_state.new_question:
if st.session_state.generation_engine == CORE:
# if st.session_state.model == 'None':
# default_func(st.session_state.question)
# elif st.session_state.model == 'Linear Executor':
if st.session_state.model == LINEAR:
linear_gen_sql(st.session_state.question)
# elif st.session_state.model == 'Chain of Thought':
elif st.session_state.model == COT:
cot_gen_sql(st.session_state.question)
else:
rag_gen_sql(st.session_state.question)
elif st.session_state.generation_engine == LITE:
lite_gen_sql(st.session_state.question)