feat(monthly_plan): 为月度计划添加数量上限
新增 `max_plans_per_month` 配置项,用于限制每个月可存在的最大月度计划数量。 现在,在向数据库添加新计划时,系统会检查当前月份的计划总数。如果添加新计划会导致总数超过上限,则只会添加允许数量内的计划,以防止计划池无限增长。
This commit is contained in:
@@ -683,6 +683,7 @@ class MonthlyPlanSystemConfig(ValidatedConfigBase):
|
||||
generation_threshold: int = Field(default=10, ge=0, description="启动时,如果当月计划少于此数量,则触发LLM生成")
|
||||
plans_per_generation: int = Field(default=5, ge=1, description="每次调用LLM期望生成的计划数量")
|
||||
deletion_probability_on_use: float = Field(default=0.5, ge=0.0, le=1.0, description="计划被使用后,被删除的概率")
|
||||
max_plans_per_month: int = Field(default=20, ge=1, description="每个月允许存在的最大计划数量")
|
||||
|
||||
|
||||
class ContextGroup(ValidatedConfigBase):
|
||||
|
||||
Reference in New Issue
Block a user