fix:修复遥测,打字时间,图像识别
This commit is contained in:
@@ -392,8 +392,8 @@ def process_llm_response(text: str) -> list[str]:
|
||||
def calculate_typing_time(
|
||||
input_string: str,
|
||||
thinking_start_time: float,
|
||||
chinese_time: float = 0.2,
|
||||
english_time: float = 0.1,
|
||||
chinese_time: float = 0.3,
|
||||
english_time: float = 0.15,
|
||||
is_emoji: bool = False,
|
||||
) -> float:
|
||||
"""
|
||||
|
||||
@@ -185,7 +185,7 @@ class ImageManager:
|
||||
|
||||
# 调用AI获取描述
|
||||
prompt = (
|
||||
"请用中文描述这张图片的内容。如果有文字,请把文字都描述出来。并尝试猜测这个图片的含义。最多100个字。"
|
||||
"请用中文描述这张图片的内容。如果有文字,请把文字都描述出来,请留意其主题,直观感受,以及是否有擦边色情内容。最多100个字。"
|
||||
)
|
||||
description, _ = await self._llm.generate_response_for_image(prompt, image_base64, image_format)
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ class TelemetryHeartBeatTask(AsyncTask):
|
||||
timeout=5, # 设置超时时间为5秒
|
||||
)
|
||||
except Exception as e:
|
||||
logger.error(f"请求UUID时出错: {e}") # 可能是网络问题
|
||||
logger.warning(f"请求UUID出错,不过你还是可以正常使用麦麦: {e}") # 可能是网络问题
|
||||
|
||||
logger.debug(f"{TELEMETRY_SERVER_URL}/stat/reg_client")
|
||||
|
||||
@@ -90,7 +90,7 @@ class TelemetryHeartBeatTask(AsyncTask):
|
||||
else:
|
||||
logger.error("无效的服务端响应")
|
||||
else:
|
||||
logger.error(f"请求UUID失败,状态码: {response.status_code}, 响应内容: {response.text}")
|
||||
logger.error(f"请求UUID失败,不过你还是可以正常使用麦麦,状态码: {response.status_code}, 响应内容: {response.text}")
|
||||
|
||||
# 请求失败,重试次数+1
|
||||
try_count += 1
|
||||
@@ -123,7 +123,7 @@ class TelemetryHeartBeatTask(AsyncTask):
|
||||
)
|
||||
except Exception as e:
|
||||
# 你知道为什么设置成debug吗?
|
||||
# 因为我不想看到群里天天报错
|
||||
# 因为我不想看到
|
||||
logger.debug(f"心跳发送失败: {e}")
|
||||
|
||||
logger.debug(response)
|
||||
|
||||
Reference in New Issue
Block a user