mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-17 01:46:07 +00:00
refactor: 重构openai包基础组件架构
This commit is contained in:
@@ -7,7 +7,20 @@ from . import stage
|
||||
from .resprule import resprule
|
||||
from .bansess import bansess
|
||||
from .cntfilter import cntfilter
|
||||
from .process import process
|
||||
from .longtext import longtext
|
||||
from .respback import respback
|
||||
|
||||
|
||||
stage_order = [
|
||||
"GroupRespondRuleCheckStage",
|
||||
"BanSessionCheckStage",
|
||||
"PreContentFilterStage",
|
||||
"MessageProcessor",
|
||||
"PostContentFilterStage",
|
||||
"LongTextProcessStage",
|
||||
"SendResponseBackStage",
|
||||
]
|
||||
|
||||
|
||||
class StageInstContainer():
|
||||
@@ -45,3 +58,6 @@ class StageManager:
|
||||
|
||||
for stage_containers in self.stage_containers:
|
||||
await stage_containers.inst.initialize()
|
||||
|
||||
# 按照 stage_order 排序
|
||||
self.stage_containers.sort(key=lambda x: stage_order.index(x.inst_name))
|
||||
|
||||
Reference in New Issue
Block a user