mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-17 19:24:19 +00:00
refactor: switch pipeline_cfg related fields to new pipeline config
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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 = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user