refactor: switch pipeline_cfg related fields to new pipeline config

This commit is contained in:
Junyan Qin
2025-04-03 17:57:51 +08:00
parent 472d472bc1
commit 7f66efcdd5
13 changed files with 62 additions and 38 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ class ConversationMessageTruncator(stage.PipelineStage):
trun: truncator.Truncator
async def initialize(self, pipeline_config: dict):
use_method = self.ap.pipeline_cfg.data['msg-truncate']['method']
use_method = "round"
for trun in truncator.preregistered_truncators:
if trun.name == use_method:
+1 -1
View File
@@ -12,7 +12,7 @@ class RoundTruncator(truncator.Truncator):
async def truncate(self, query: core_entities.Query) -> core_entities.Query:
"""截断
"""
max_round = self.ap.pipeline_cfg.data['msg-truncate']['round']['max-round']
max_round = query.pipeline_config['ai']['local-agent']['max-round']
temp_messages = []