fix: 'Session' object has no attribute 'exec'

This commit is contained in:
ulleo
2025-10-14 18:55:50 +08:00
committed by ulleo
parent 3c1d1e6e77
commit e5fc5f857d
+1 -2
View File
@@ -56,7 +56,7 @@ executor = ThreadPoolExecutor(max_workers=200)
dynamic_ds_types = [1, 3]
dynamic_subsql_prefix = 'select * from sqlbot_dynamic_temp_table_'
session_maker = scoped_session(sessionmaker(bind=engine))
session_maker = scoped_session(sessionmaker(bind=engine, class_=Session))
class LLMService:
@@ -88,7 +88,6 @@ class LLMService:
current_assistant: Optional[CurrentAssistant] = None, no_reasoning: bool = False,
embedding: bool = False, config: LLMConfig = None):
self.chunk_list = []
session.exec = session.exec if hasattr(session, "exec") else session.execute
self.current_user = current_user
self.current_assistant = current_assistant
chat_id = chat_question.chat_id