fix: wrong name close #2530 (#2532)

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
This commit is contained in:
yihong 2025-03-26 22:03:34 +08:00 committed by GitHub
parent e68bdfcb8e
commit 10619aaf96
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -90,6 +90,8 @@ class DbHistoryMemory(BaseChatHistoryMemory):
chat_history = self.chat_history_dao.get_by_uid(self.chat_seesion_id)
if chat_history:
context = chat_history.messages
if not context:
return []
return json.loads(context) # type: ignore
return []

View File

@ -320,7 +320,7 @@ async def chart_editor_submit(chart_edit_context: ChatChartEditContext = Body())
logger.info(f"sql_editor_submit:{chart_edit_context.__dict__}")
chat_history_fac = ChatHistory()
history_mem = chat_history_fac.get_store_instance(chart_edit_context.con_uid)
history_mem = chat_history_fac.get_store_instance(chart_edit_context.conv_uid)
history_messages: List[OnceConversation] = history_mem.get_messages()
if history_messages:
dashboard_data_loader: DashboardDataLoader = DashboardDataLoader()