feat: add functions

This commit is contained in:
WangCham
2025-07-03 23:28:47 +08:00
committed by Junyan Qin
parent c4671fbf1c
commit 34fe8b324d
12 changed files with 75 additions and 49 deletions

View File

@@ -27,10 +27,7 @@ from ..storage import mgr as storagemgr
from ..utils import logcache
from . import taskmgr
from . import entities as core_entities
from ...pkg.rag.knowledge import RAG_Manager
from pkg.rag.knowledge.RAG_Manager import RAG_Manager
class Application:
@@ -51,6 +48,7 @@ class Application:
model_mgr: llm_model_mgr.ModelManager = None
# TODO 移动到 pipeline 里
tool_mgr: llm_tool_mgr.ToolManager = None
@@ -103,7 +101,6 @@ class Application:
storage_mgr: storagemgr.StorageMgr = None
knowledge_base_service: RAG_Manager = None
# ========= HTTP Services =========
@@ -117,6 +114,8 @@ class Application:
bot_service: bot_service.BotService = None
knowledge_base_service: RAG_Manager = None
def __init__(self):
pass
@@ -152,6 +151,7 @@ class Application:
name='http-api-controller',
scopes=[core_entities.LifecycleControlScope.APPLICATION],
)
self.task_mgr.create_task(
never_ending(),
name='never-ending-task',