mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
fix: 'Session' object has no attribute 'exec'
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user