feat: add MemoryBlock config to LLM's memory config

This commit is contained in:
Stream 2025-08-20 19:53:44 +08:00
parent bbb640c9a2
commit 8341b8b1c1
No known key found for this signature in database
GPG Key ID: 9475891C9507B4F3
1 changed files with 7 additions and 0 deletions

View File

@ -45,6 +45,13 @@ class MemoryConfig(BaseModel):
enabled: bool
size: Optional[int] = None
mode: Optional[Literal["linear", "block"]] = "linear"
block_id: Optional[list[str]] = None # available only in block mode
role_prefix: Optional[RolePrefix] = None
window: WindowConfig
query_prompt_template: Optional[str] = None
@property
def is_block_mode(self) -> bool:
return self.mode == "block" and bool(self.block_id)