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

Method apply

prompts/layers.py:22–30  ·  view source on GitHub ↗
(self, bundle: PromptBundle)

Source from the content-addressed store, hash-verified

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 2

_invoke_graphMethod · 0.80
get_prompt_bundleFunction · 0.80

Calls 2

_apply_prompt_additionFunction · 0.85
copyMethod · 0.80

Tested by

no test coverage detected