File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -520,14 +520,14 @@ def select_datasource(self):
520520 answer = orjson .dumps ({'content' : full_text }).decode (),
521521 datasource = _datasource ,
522522 engine_type = _engine_type )
523+ if self .ds :
524+ self .chat_question .terminologies = get_terminology_template (self .session , self .chat_question .question ,
525+ self .ds .oid if isinstance (self .ds ,
526+ CoreDatasource ) else 1 )
527+ self .chat_question .data_training = get_training_template (self .session , self .chat_question .question ,
528+ self .ds .id , self .ds .oid )
523529
524- self .chat_question .terminologies = get_terminology_template (self .session , self .chat_question .question ,
525- self .ds .oid if isinstance (self .ds ,
526- CoreDatasource ) else 1 )
527- self .chat_question .data_training = get_training_template (self .session , self .chat_question .question ,
528- self .ds .id , self .ds .oid )
529-
530- self .init_messages ()
530+ self .init_messages ()
531531
532532 if _error :
533533 raise _error
@@ -1110,6 +1110,7 @@ def run_task(self, in_chat: bool = True):
11101110 SQLBotLogUtil .info (image_url )
11111111 yield f'![{ chart ["type" ]} ]({ image_url } )'
11121112 except Exception as e :
1113+ traceback .print_exc ()
11131114 error_msg : str
11141115 if isinstance (e , SingleMessageError ):
11151116 error_msg = str (e )
You can’t perform that action at this time.
0 commit comments