unify plugin llm clients on shared utils layer
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from .decision_flow import DecisionFlow
|
||||
from .llm_client import LLMClient
|
||||
from .llm_result_parser import LLMResultParser
|
||||
from .prompt_builder import build_user_prompt
|
||||
from .reply_formatter import finalize_reply, preview_text
|
||||
@@ -10,7 +9,6 @@ from .triggers import TriggerResult, TriggerRouter
|
||||
|
||||
__all__ = [
|
||||
"DecisionFlow",
|
||||
"LLMClient",
|
||||
"LLMResultParser",
|
||||
"ResponsePlanner",
|
||||
"TriggerResult",
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
from utils.ai.unified_llm import UnifiedLLMClient
|
||||
|
||||
|
||||
class LLMClient(UnifiedLLMClient):
|
||||
"""兼容旧调用方式的统一 LLM 客户端别名。"""
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from .core.llm_client import LLMClient
|
||||
|
||||
__all__ = ["LLMClient"]
|
||||
@@ -8,6 +8,7 @@ from loguru import logger
|
||||
|
||||
from base.plugin_common.message_plugin_interface import MessagePluginInterface
|
||||
from base.plugin_common.plugin_interface import PluginStatus
|
||||
from utils.ai.unified_llm import UnifiedLLMClient
|
||||
from utils.robot_cmd.robot_command import GroupBotManager, PermissionStatus
|
||||
from utils.wechat.contact_manager import ContactManager
|
||||
from wechat_ipad import WechatAPIClient
|
||||
@@ -21,7 +22,6 @@ from .context.image_context import (
|
||||
prepare_quote_image_inputs,
|
||||
)
|
||||
from .context.quote_context import parse_quote_context
|
||||
from .core.llm_client import LLMClient
|
||||
from .memory.memory_store import MemoryStore
|
||||
from .memory.vector_memory import VectorMemoryStore
|
||||
from .profile.persona_engine import PersonaEngine
|
||||
@@ -113,7 +113,7 @@ class AIAutoResponsePlugin(MessagePluginInterface):
|
||||
self.vector_memory = VectorMemoryStore(self._config.get("memory", {}) or {})
|
||||
self.context_builder = ContextBuilder(int((self._config.get("mode", {}) or {}).get("recent_context_size", 30)))
|
||||
self.decision_flow = DecisionFlow()
|
||||
self.llm_client = LLMClient(self._config.get("api", {}) or {})
|
||||
self.llm_client = UnifiedLLMClient(self._config.get("api", {}) or {})
|
||||
self.social_memory = SocialMemoryService(self.db_manager, self._config.get("memory", {}) or {})
|
||||
self.group_facts = GroupFactsService(self._config.get("memory", {}) or {})
|
||||
self.memory_ranker = MemoryRanker(self._config.get("memory", {}) or {})
|
||||
|
||||
Reference in New Issue
Block a user