fix delete user conversation not being async
This commit is contained in:
parent
2c1008aa51
commit
009dbc5efc
2 changed files with 3 additions and 3 deletions
|
|
@ -672,8 +672,8 @@ async def async_langflow_chat_stream(
|
|||
)
|
||||
|
||||
|
||||
def delete_user_conversation(user_id: str, response_id: str) -> bool:
|
||||
"""Delete a conversation for a user from both memory and persistent storage"""
|
||||
async def delete_user_conversation(user_id: str, response_id: str) -> bool:
|
||||
"""Delete a conversation for a user from both memory and persistent storage (async, non-blocking)"""
|
||||
deleted = False
|
||||
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -595,7 +595,7 @@ class ChatService:
|
|||
try:
|
||||
# Delete from local conversation storage
|
||||
from agent import delete_user_conversation
|
||||
local_deleted = delete_user_conversation(user_id, session_id)
|
||||
local_deleted = await delete_user_conversation(user_id, session_id)
|
||||
|
||||
# Delete from Langflow using the monitor API
|
||||
langflow_deleted = await self._delete_langflow_session(session_id)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue