mirror of https://github.com/Mai-with-u/MaiBot.git
Merge branch 'dev' of https://github.com/SnowindMe/MaiBot into dev
commit
3aa7415595
|
|
@ -199,7 +199,7 @@ class MongoToSQLiteMigrator:
|
||||||
"timestamp": "timestamp",
|
"timestamp": "timestamp",
|
||||||
},
|
},
|
||||||
enable_validation=True, # 禁用数据验证"
|
enable_validation=True, # 禁用数据验证"
|
||||||
unique_fields=["user_id", "prompt_tokens","completion_tokens","total_tokens","cost"], # 组合唯一性
|
unique_fields=["user_id", "prompt_tokens", "completion_tokens", "total_tokens", "cost"], # 组合唯一性
|
||||||
),
|
),
|
||||||
# 消息迁移配置
|
# 消息迁移配置
|
||||||
MigrationConfig(
|
MigrationConfig(
|
||||||
|
|
|
||||||
|
|
@ -335,7 +335,9 @@ class HeartFChatting:
|
||||||
for pname, ptime in processor_time_costs.items():
|
for pname, ptime in processor_time_costs.items():
|
||||||
formatted_ptime = f"{ptime * 1000:.2f}毫秒" if ptime < 1 else f"{ptime:.2f}秒"
|
formatted_ptime = f"{ptime * 1000:.2f}毫秒" if ptime < 1 else f"{ptime:.2f}秒"
|
||||||
processor_time_strings.append(f"{pname}: {formatted_ptime}")
|
processor_time_strings.append(f"{pname}: {formatted_ptime}")
|
||||||
processor_time_log = ("\n各处理器耗时: " + "; ".join(processor_time_strings)) if processor_time_strings else ""
|
processor_time_log = (
|
||||||
|
("\n各处理器耗时: " + "; ".join(processor_time_strings)) if processor_time_strings else ""
|
||||||
|
)
|
||||||
|
|
||||||
logger.info(
|
logger.info(
|
||||||
f"{self.log_prefix} 第{self._current_cycle.cycle_id}次思考,"
|
f"{self.log_prefix} 第{self._current_cycle.cycle_id}次思考,"
|
||||||
|
|
@ -471,7 +473,9 @@ class HeartFChatting:
|
||||||
running_memorys = await self.memory_activator.activate_memory(observations)
|
running_memorys = await self.memory_activator.activate_memory(observations)
|
||||||
|
|
||||||
with Timer("执行 信息处理器", cycle_timers):
|
with Timer("执行 信息处理器", cycle_timers):
|
||||||
all_plan_info, processor_time_costs = await self._process_processors(observations, running_memorys, cycle_timers)
|
all_plan_info, processor_time_costs = await self._process_processors(
|
||||||
|
observations, running_memorys, cycle_timers
|
||||||
|
)
|
||||||
|
|
||||||
loop_processor_info = {
|
loop_processor_info = {
|
||||||
"all_plan_info": all_plan_info,
|
"all_plan_info": all_plan_info,
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from src.tools.tool_can_use.base_tool import BaseTool,run_lua_code
|
from src.tools.tool_can_use.base_tool import BaseTool, run_lua_code
|
||||||
from src.common.logger import get_module_logger
|
from src.common.logger import get_module_logger
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from src.tools.tool_can_use.base_tool import BaseTool,run_lua_code
|
from src.tools.tool_can_use.base_tool import BaseTool, run_lua_code
|
||||||
from src.common.logger_manager import get_logger
|
from src.common.logger_manager import get_logger
|
||||||
from typing import Dict, Any
|
from typing import Dict, Any
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue