添加了一点日志
This commit is contained in:
@@ -206,13 +206,6 @@ class CycleProcessor:
|
||||
raise UserWarning(f"插件{result.get_summary().get('stopped_handlers', '')}于规划前中断了内容生成")
|
||||
with Timer("规划器", cycle_timers):
|
||||
actions, _ = await self.action_planner.plan(mode=mode)
|
||||
|
||||
# 在这里添加日志,清晰地显示最终选择的动作
|
||||
if actions:
|
||||
chosen_actions = [a.get("action_type", "unknown") for a in actions]
|
||||
logger.info(f"{self.log_prefix} LLM最终选择的动作: {chosen_actions}")
|
||||
else:
|
||||
logger.info(f"{self.log_prefix} LLM最终没有选择任何动作")
|
||||
|
||||
async def execute_action(action_info):
|
||||
"""执行单个动作的通用函数"""
|
||||
|
||||
@@ -46,12 +46,12 @@ class PlanFilter:
|
||||
try:
|
||||
prompt, used_message_id_list = await self._build_prompt(plan)
|
||||
plan.llm_prompt = prompt
|
||||
logger.debug(f"墨墨在这里加了日志 -> LLM prompt: {prompt}")
|
||||
logger.info(f"规划器原始提示词: {prompt}")
|
||||
|
||||
llm_content, _ = await self.planner_llm.generate_response_async(prompt=prompt)
|
||||
|
||||
if llm_content:
|
||||
logger.debug(f"墨墨在这里加了日志 -> LLM a原始返回: {llm_content}")
|
||||
logger.info(f"规划器原始返回: {llm_content}")
|
||||
parsed_json = orjson.loads(repair_json(llm_content))
|
||||
logger.debug(f"墨墨在这里加了日志 -> 解析后的 JSON: {parsed_json}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user