mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-02 00:28:00 +00:00
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
This commit is contained in:
parent
e68bdfcb8e
commit
10619aaf96
@ -90,6 +90,8 @@ class DbHistoryMemory(BaseChatHistoryMemory):
|
|||||||
chat_history = self.chat_history_dao.get_by_uid(self.chat_seesion_id)
|
chat_history = self.chat_history_dao.get_by_uid(self.chat_seesion_id)
|
||||||
if chat_history:
|
if chat_history:
|
||||||
context = chat_history.messages
|
context = chat_history.messages
|
||||||
|
if not context:
|
||||||
|
return []
|
||||||
return json.loads(context) # type: ignore
|
return json.loads(context) # type: ignore
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
@ -320,7 +320,7 @@ async def chart_editor_submit(chart_edit_context: ChatChartEditContext = Body())
|
|||||||
logger.info(f"sql_editor_submit:{chart_edit_context.__dict__}")
|
logger.info(f"sql_editor_submit:{chart_edit_context.__dict__}")
|
||||||
|
|
||||||
chat_history_fac = ChatHistory()
|
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()
|
history_messages: List[OnceConversation] = history_mem.get_messages()
|
||||||
if history_messages:
|
if history_messages:
|
||||||
dashboard_data_loader: DashboardDataLoader = DashboardDataLoader()
|
dashboard_data_loader: DashboardDataLoader = DashboardDataLoader()
|
||||||
|
Loading…
Reference in New Issue
Block a user