File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
backend/apps/datasource/crud Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 44from typing import List
55
66from sqlalchemy import and_ , select , update
7+ from sqlalchemy .orm .session import Session
78
89from apps .ai_model .embedding import EmbeddingModelCache
910from common .core .config import settings
@@ -30,18 +31,19 @@ def update_table(session: SessionDep, item: CoreTable):
3031 session .commit ()
3132
3233
33- def run_fill_empty_table_embedding (session : SessionDep ):
34+ def run_fill_empty_table_embedding (session : Session ):
3435 if not settings .EMBEDDING_ENABLED :
3536 return
3637
38+ SQLBotLogUtil .info ('get tables' )
3739 stmt = select (CoreTable .id ).where (and_ (CoreTable .embedding .is_ (None )))
3840 results = session .execute (stmt ).scalars ().all ()
3941 SQLBotLogUtil .info (json .dumps (results ))
4042
4143 save_table_embedding (session , results )
4244
4345
44- def save_table_embedding (session : SessionDep , ids : List [int ]):
46+ def save_table_embedding (session : Session , ids : List [int ]):
4547 if not settings .EMBEDDING_ENABLED :
4648 return
4749
You can’t perform that action at this time.
0 commit comments