unify plugin llm clients on shared utils layer
This commit is contained in:
@@ -21,7 +21,7 @@ except ImportError:
|
||||
from base.plugin_common.message_plugin_interface import MessagePluginInterface
|
||||
from base.plugin_common.plugin_interface import PluginStatus
|
||||
from db.connection import DBConnectionManager
|
||||
from plugins.ai_auto_response.llm_client import LLMClient
|
||||
from utils.ai.unified_llm import UnifiedLLMClient
|
||||
from plugins.douyu.danmu_summary import DouyuDanmuSummaryHelper
|
||||
from plugins.douyu.report_template import render_daily_report_html
|
||||
from utils.decorator.async_job import async_job
|
||||
@@ -490,7 +490,7 @@ class DouyuPlugin(MessagePluginInterface):
|
||||
self._daily_report_max_length = 1800
|
||||
self._daily_report_send_image = True
|
||||
self._audience_stats_sample_interval_seconds = 60
|
||||
self._daily_report_llm_client: Optional[LLMClient] = None
|
||||
self._daily_report_llm_client: Optional[UnifiedLLMClient] = None
|
||||
self._danmu_recorders: Dict[str, DouyuDanmuRecorder] = {}
|
||||
async_job.every_minutes(self._check_interval)(self._scheduled_unified_check_job)
|
||||
async_job.every_minutes(5)(self._scheduled_daily_report_tick)
|
||||
@@ -543,7 +543,7 @@ class DouyuPlugin(MessagePluginInterface):
|
||||
|
||||
report_api_cfg = cfg.get("report_api", {}) or {}
|
||||
if report_api_cfg:
|
||||
self._daily_report_llm_client = LLMClient(report_api_cfg)
|
||||
self._daily_report_llm_client = UnifiedLLMClient(report_api_cfg)
|
||||
return True
|
||||
except Exception as e:
|
||||
logger.error(f"{self.name} 初始化失败: {e}")
|
||||
|
||||
Reference in New Issue
Block a user