mirror of
https://github.com/Nezumi-2711/astrbot_plugin_qq_group_daily_analysis.git
synced 2026-09-22 13:38:43 +00:00
[fix] 日志
This commit is contained in:
@@ -164,6 +164,7 @@ def extract_topics_with_regex(result_text: str, max_topics: int) -> List[Dict]:
|
||||
"detail": detail
|
||||
})
|
||||
|
||||
logger.info(f"话题正则表达式提取成功,提取到 {len(topics)} 条有效话题内容")
|
||||
return topics
|
||||
|
||||
except Exception as e:
|
||||
@@ -212,6 +213,7 @@ def extract_user_titles_with_regex(result_text: str, max_count: int) -> List[Dic
|
||||
"reason": reason
|
||||
})
|
||||
|
||||
logger.info(f"用户称号正则表达式提取成功,提取到 {len(titles)} 条有效用户称号")
|
||||
return titles
|
||||
|
||||
except Exception as e:
|
||||
@@ -257,6 +259,7 @@ def extract_golden_quotes_with_regex(result_text: str, max_count: int) -> List[D
|
||||
"reason": reason
|
||||
})
|
||||
|
||||
logger.info(f"金句正则表达式提取成功,提取到 {len(quotes)} 条有效金句")
|
||||
return quotes
|
||||
|
||||
except Exception as e:
|
||||
|
||||
@@ -82,6 +82,18 @@ async def call_provider_with_retry(context, config_manager, prompt: str, max_tok
|
||||
return CustomResponse()
|
||||
else:
|
||||
# 确保使用当前指定的模型
|
||||
if provider is None:
|
||||
provider = context.get_using_provider(umo=umo)
|
||||
provider_id = 'unknown'
|
||||
if provider:
|
||||
try:
|
||||
meta = provider.meta()
|
||||
provider_id = meta.id
|
||||
except Exception as e:
|
||||
logger.debug(f"获取提供商ID失败: {e}")
|
||||
logger.info(f"获取到的 provider ID: {provider_id}")
|
||||
if not provider or provider_id == 'unknown':
|
||||
logger.warning(f"获取的提供商不正确 (Provider ID: {provider_id})")
|
||||
provider = context.get_using_provider(umo=umo)
|
||||
provider_id = 'unknown'
|
||||
if provider:
|
||||
|
||||
Reference in New Issue
Block a user