| 12 | |
| 13 | @dataclass(frozen=True, slots=True) |
| 14 | class PromptLayer: |
| 15 | scan: str = "" |
| 16 | inquire: str = "" |
| 17 | exploit: str = "" |
| 18 | select: str = "" |
| 19 | check: str = "" |
| 20 | optimize: str = "" |
| 21 | |
| 22 | def apply(self, bundle: PromptBundle) -> PromptBundle: |
| 23 | return bundle.copy( |
| 24 | scan=_apply_prompt_addition(bundle.scan, self.scan), |
| 25 | inquire=_apply_prompt_addition(bundle.inquire, self.inquire), |
| 26 | exploit=_apply_prompt_addition(bundle.exploit, self.exploit), |
| 27 | select=_apply_prompt_addition(bundle.select, self.select), |
| 28 | check=_apply_prompt_addition(bundle.check, self.check), |
| 29 | optimize=_apply_prompt_addition(bundle.optimize, self.optimize), |
| 30 | ) |
| 31 | |
| 32 | |
| 33 | def _apply_prompt_addition(prompt: str, addition: str) -> str: |
no outgoing calls
no test coverage detected