File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed
frontend/src/views/system/model Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -836,7 +836,8 @@ def run_task(self, in_chat: bool = True):
836836 self .ds .id ) if self .out_ds_instance else get_table_schema (session = self .session ,
837837 current_user = self .current_user ,
838838 ds = self .ds )
839-
839+ else :
840+ self .validate_history_ds ()
840841 # generate sql
841842 sql_res = self .generate_sql ()
842843 full_sql_text = ''
@@ -1025,7 +1026,13 @@ def run_analysis_or_predict_task(self, action_type: str):
10251026 finally :
10261027 # end
10271028 pass
1028-
1029+
1030+ def validate_history_ds (self ):
1031+ _invalid_ds = False
1032+ _ds = self .ds
1033+ _assistant = self .current_assistant
1034+ if _invalid_ds :
1035+ yield orjson .dumps ({'content' : 'ds is invalid' , 'type' : 'error' }).decode () + '\n \n '
10291036
10301037def execute_sql_with_db (db : SQLDatabase , sql : str ) -> str :
10311038 """Execute SQL query using SQLDatabase
Original file line number Diff line number Diff line change 99)
1010from pydantic_core import MultiHostUrl
1111from pydantic_settings import BaseSettings , SettingsConfigDict
12- from typing_extensions import Self
1312
1413
1514def parse_cors (v : Any ) -> list [str ] | str :
Original file line number Diff line number Diff line change @@ -71,6 +71,8 @@ const defaultModelListWithSearch = computed(() => {
7171})
7272
7373const modelCheckHandler = async (item : any ) => {
74+ console .log (item )
75+ /**
7476 const response = await modelApi.check(item)
7577 const reader = response.body.getReader()
7678 const decoder = new TextDecoder()
@@ -110,6 +112,7 @@ const modelCheckHandler = async (item: any) => {
110112 currentRef?.showErrorMask(checkMsg)
111113 }
112114 })
115+ */
113116}
114117const duplicateName = async (item : any ) => {
115118 const res = await modelApi .queryAll ()
You can’t perform that action at this time.
0 commit comments