fix:修复插件无法被关闭,新增新log浏览器
This commit is contained in:
@@ -96,7 +96,7 @@ class NormalChatGenerator:
|
||||
try:
|
||||
content, (reasoning_content, model_name) = await model.generate_response_async(prompt)
|
||||
|
||||
logger.debug(f"prompt:{prompt}\n生成回复:{content}")
|
||||
logger.info(f"prompt:{prompt}\n生成回复:{content}")
|
||||
|
||||
logger.info(f"对 {message.processed_plain_text} 的回复:{content}")
|
||||
|
||||
|
||||
@@ -158,10 +158,10 @@ class NormalChatPlanner:
|
||||
try:
|
||||
content, (reasoning_content, model_name) = await self.planner_llm.generate_response_async(prompt)
|
||||
|
||||
logger.debug(f"{self.log_prefix}规划器原始提示词: {prompt}")
|
||||
logger.debug(f"{self.log_prefix}规划器原始响应: {content}")
|
||||
logger.debug(f"{self.log_prefix}规划器推理: {reasoning_content}")
|
||||
logger.debug(f"{self.log_prefix}规划器模型: {model_name}")
|
||||
logger.info(f"{self.log_prefix}规划器原始提示词: {prompt}")
|
||||
logger.info(f"{self.log_prefix}规划器原始响应: {content}")
|
||||
logger.info(f"{self.log_prefix}规划器推理: {reasoning_content}")
|
||||
logger.info(f"{self.log_prefix}规划器模型: {model_name}")
|
||||
|
||||
# 解析JSON响应
|
||||
try:
|
||||
@@ -263,7 +263,7 @@ class NormalChatPlanner:
|
||||
|
||||
if action_parameters:
|
||||
param_text = "\n"
|
||||
print(action_parameters)
|
||||
# print(action_parameters)
|
||||
for param_name, param_description in action_parameters.items():
|
||||
param_text += f' "{param_name}":"{param_description}"\n'
|
||||
param_text = param_text.rstrip("\n")
|
||||
|
||||
@@ -357,7 +357,7 @@ def _build_readable_messages_internal(
|
||||
limit = 200
|
||||
replace_content = "......(内容太长了)"
|
||||
elif percentile < 1.0: # 80% 到 100% 之前的消息 (即较新的 20%)
|
||||
limit = 300
|
||||
limit = 400
|
||||
replace_content = "......(太长了)"
|
||||
|
||||
truncated_content = content
|
||||
|
||||
@@ -633,7 +633,7 @@ def translate_timestamp_to_human_readable(timestamp: float, mode: str = "normal"
|
||||
elif diff < 86400 * 2:
|
||||
return f"{int(diff / 86400)}天前"
|
||||
else:
|
||||
return time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(timestamp)) + ":\n"
|
||||
return time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(timestamp)) + ":"
|
||||
else: # mode = "lite" or unknown
|
||||
# 只返回时分秒格式,喵~
|
||||
return time.strftime("%H:%M:%S", time.localtime(timestamp))
|
||||
|
||||
Reference in New Issue
Block a user