MCPcopy Create free account
hub / github.com/Dizzy-K/AutoPT / PromptLayer

Class PromptLayer

prompts/layers.py:14–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12
13@dataclass(frozen=True, slots=True)
14class 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
33def _apply_prompt_addition(prompt: str, addition: str) -> str:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected