refactor: 命令处理基础

This commit is contained in:
RockChinQ
2024-01-28 00:16:42 +08:00
parent f10af09bd2
commit 2a0cf57303
10 changed files with 286 additions and 22 deletions
+3 -1
View File
@@ -12,6 +12,7 @@ from ..openai.tools import toolmgr as llm_tool_mgr
from ..config import manager as config_mgr
from ..database import manager as database_mgr
from ..utils.center import v2 as center_mgr
from ..command import cmdmgr
from ..plugin import host as plugin_host
from . import pool, controller
from ..pipeline import stagemgr
@@ -22,6 +23,8 @@ class Application:
llm_mgr: openai_mgr.OpenAIInteract = None
cmd_mgr: cmdmgr.CommandManager = None
sess_mgr: llm_session_mgr.SessionManager = None
model_mgr: llm_model_mgr.ModelManager = None
@@ -54,7 +57,6 @@ class Application:
# 把现有的所有内容函数加到toolmgr里
for func in plugin_host.__callable_functions__:
print(func)
self.tool_mgr.register_legacy_function(
name=func['name'],
description=func['description'],