From 02704fbbabee3b09afd262462b902696acb7715a Mon Sep 17 00:00:00 2001 From: AllentDan Date: Mon, 18 Dec 2023 12:45:05 +0800 Subject: [PATCH] end session --- lmdeploy/serve/gradio/turbomind_coupled.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lmdeploy/serve/gradio/turbomind_coupled.py b/lmdeploy/serve/gradio/turbomind_coupled.py index 0ca3a2af78..2098872e79 100644 --- a/lmdeploy/serve/gradio/turbomind_coupled.py +++ b/lmdeploy/serve/gradio/turbomind_coupled.py @@ -69,13 +69,7 @@ async def reset_local_func(instruction_txtbox: gr.Textbox, """ state_chatbot = [] # end the session - async for out in InterFace.async_engine.generate('', - session_id, - request_output_len=1, - stream_response=True, - sequence_start=False, - sequence_end=True): - pass + InterFace.async_engine.end_session(session_id) return (state_chatbot, state_chatbot, gr.Textbox.update(value=''))