chore(log): 调整LLM相关日志级别为DEBUG
将LLM原始提示词和响应的日志级别从`INFO`调整为`DEBUG`。 此举旨在减少非调试模式下的日志输出,避免过长的模型交互内容刷屏,从而保持日志的整洁性,仅在需要时提供详细的调试信息。
This commit is contained in:
@@ -961,6 +961,7 @@ class LLMRequest:
|
||||
)
|
||||
|
||||
await self._record_usage(model_info, response.usage, time.time() - start_time, "/chat/completions")
|
||||
logger.debug(f"LLM原始响应: {response.content}")
|
||||
|
||||
if not response.content and not response.tool_calls:
|
||||
if raise_when_empty:
|
||||
|
||||
@@ -60,13 +60,13 @@ class ChatterPlanFilter:
|
||||
prompt, used_message_id_list = await self._build_prompt(plan)
|
||||
plan.llm_prompt = prompt
|
||||
if global_config.debug.show_prompt:
|
||||
logger.info(f"规划器原始提示词:{prompt}")
|
||||
logger.debug(f"规划器原始提示词:{prompt}")
|
||||
|
||||
llm_content, _ = await self.planner_llm.generate_response_async(prompt=prompt)
|
||||
|
||||
if llm_content:
|
||||
if global_config.debug.show_prompt:
|
||||
logger.info(f"LLM规划器原始响应:{llm_content}")
|
||||
logger.debug(f"LLM规划器原始响应:{llm_content}")
|
||||
try:
|
||||
parsed_json = orjson.loads(repair_json(llm_content))
|
||||
except orjson.JSONDecodeError:
|
||||
|
||||
Reference in New Issue
Block a user