update:加入测试速度功能

This commit is contained in:
hrz
2025-02-09 16:44:57 +08:00
parent 99f634f929
commit ba2cc8c447
7 changed files with 143 additions and 27 deletions
+2 -1
View File
@@ -111,7 +111,7 @@ class ConnectionHandler:
# 提交 LLM 任务
try:
start_time = time.time() # 记录开始时间
llm_responses = self.llm.response(self, self.dialogue.get_llm_dialogue())
llm_responses = self.llm.response(self.session_id, self.dialogue.get_llm_dialogue())
except Exception as e:
self.logger.error(f"LLM 处理出错 {query}: {e}")
return None
@@ -203,6 +203,7 @@ class ConnectionHandler:
def recode_first_last_text(self, text):
if not self.tts_first_text:
self.logger.info(f"大模型说出第一句话: {text}")
self.tts_first_text = text
self.tts_last_text = text