mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-07 11:23:40 +00:00
default scene change
This commit is contained in:
parent
430e026c3e
commit
fbc29bb2a7
@ -206,7 +206,13 @@ def post_process_code(code):
|
|||||||
def get_chat_mode(selected, param=None) -> ChatScene:
|
def get_chat_mode(selected, param=None) -> ChatScene:
|
||||||
if chat_mode_title["chat_use_plugin"] == selected:
|
if chat_mode_title["chat_use_plugin"] == selected:
|
||||||
return ChatScene.ChatExecution
|
return ChatScene.ChatExecution
|
||||||
elif chat_mode_title["knowledge_qa"] == selected:
|
elif chat_mode_title["sql_generate_diagnostics"] == selected:
|
||||||
|
sql_mode = param
|
||||||
|
if sql_mode == conversation_sql_mode["auto_execute_ai_response"]:
|
||||||
|
return ChatScene.ChatWithDbExecute
|
||||||
|
else:
|
||||||
|
return ChatScene.ChatWithDbQA
|
||||||
|
else:
|
||||||
mode = param
|
mode = param
|
||||||
if mode == conversation_types["default_knownledge"]:
|
if mode == conversation_types["default_knownledge"]:
|
||||||
return ChatScene.ChatKnowledge
|
return ChatScene.ChatKnowledge
|
||||||
@ -216,12 +222,7 @@ def get_chat_mode(selected, param=None) -> ChatScene:
|
|||||||
return ChatScene.ChatUrlKnowledge
|
return ChatScene.ChatUrlKnowledge
|
||||||
else:
|
else:
|
||||||
return ChatScene.ChatNormal
|
return ChatScene.ChatNormal
|
||||||
else:
|
|
||||||
sql_mode = param
|
|
||||||
if sql_mode == conversation_sql_mode["auto_execute_ai_response"]:
|
|
||||||
return ChatScene.ChatWithDbExecute
|
|
||||||
else:
|
|
||||||
return ChatScene.ChatWithDbQA
|
|
||||||
|
|
||||||
|
|
||||||
def chatbot_callback(state, message):
|
def chatbot_callback(state, message):
|
||||||
|
Loading…
Reference in New Issue
Block a user