Skip to content

Commit c5ab4a8

Browse files
perf: Disable model validate
1 parent 7886392 commit c5ab4a8

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

backend/apps/chat/task/llm.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff 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

10301037
def execute_sql_with_db(db: SQLDatabase, sql: str) -> str:
10311038
"""Execute SQL query using SQLDatabase

backend/common/core/config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
)
1010
from pydantic_core import MultiHostUrl
1111
from pydantic_settings import BaseSettings, SettingsConfigDict
12-
from typing_extensions import Self
1312

1413

1514
def parse_cors(v: Any) -> list[str] | str:

frontend/src/views/system/model/Model.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ const defaultModelListWithSearch = computed(() => {
7171
})
7272
7373
const 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
}
114117
const duplicateName = async (item: any) => {
115118
const res = await modelApi.queryAll()

0 commit comments

Comments
 (0)