Skip to content

Commit 16781d0

Browse files
fix: sessionmaker miss exec
1 parent 351e6cf commit 16781d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/apps/chat/task/llm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def __init__(self, current_user: CurrentUser, chat_question: ChatQuestion,
7171
engine = create_engine(str(settings.SQLALCHEMY_DATABASE_URI))
7272
session_maker = sessionmaker(bind=engine)
7373
self.session = session_maker()
74-
74+
self.session.exec = self.session.exec if hasattr(self.session, "exec") else self.session.execute
7575
self.current_user = current_user
7676
self.current_assistant = current_assistant
7777
# chat = self.session.query(Chat).filter(Chat.id == chat_question.chat_id).first()

0 commit comments

Comments
 (0)