MCPcopy Create free account
hub / github.com/BIT-DataLab/Edit-Banana / PromptGroupConfig

Class PromptGroupConfig

modules/sam3_info_extractor.py:41–58  ·  view source on GitHub ↗

提示词组配置

Source from the content-addressed store, hash-verified

39
40@dataclass
41class PromptGroupConfig:
42 """提示词组配置"""
43 name: str # 组名
44 prompts: List[str] = field(default_factory=list) # 该组的提示词
45 score_threshold: float = 0.5 # 置信度阈值
46 min_area: int = 100 # 最小面积
47 priority: int = 1 # 去重优先级(越高越优先保留)
48 description: str = "" # 描述
49
50 def add_prompt(self, prompt: str):
51 """添加提示词"""
52 if prompt not in self.prompts:
53 self.prompts.append(prompt)
54
55 def remove_prompt(self, prompt: str):
56 """移除提示词"""
57 if prompt in self.prompts:
58 self.prompts.remove(prompt)
59
60
61# ======================== 配置加载器 ========================

Callers 1

get_prompt_groupsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected