MCPcopy Create free account
hub / github.com/FSoft-AI4Code/CodeWiki / format_system_prompt

Function format_system_prompt

codewiki/src/be/prompt_template.py:377–392  ·  view source on GitHub ↗

Format the system prompt with module name and optional custom instructions. Args: module_name: Name of the module to document custom_instructions: Optional custom instructions to append Returns: Formatted system prompt string

(module_name: str, custom_instructions: str = None)

Source from the content-addressed store, hash-verified

375
376
377def format_system_prompt(module_name: str, custom_instructions: str = None) -> str:
378 """
379 Format the system prompt with module name and optional custom instructions.
380
381 Args:
382 module_name: Name of the module to document
383 custom_instructions: Optional custom instructions to append
384
385 Returns:
386 Formatted system prompt string
387 """
388 custom_section = ""
389 if custom_instructions:
390 custom_section = f"\n\n<CUSTOM_INSTRUCTIONS>\n{custom_instructions}\n</CUSTOM_INSTRUCTIONS>"
391
392 return SYSTEM_PROMPT.format(module_name=module_name, custom_instructions=custom_section).strip()
393
394
395def format_leaf_system_prompt(module_name: str, custom_instructions: str = None) -> str:

Callers 3

run_module_agentMethod · 0.90
_resolve_promptFunction · 0.90

Calls 1

formatMethod · 0.80

Tested by

no test coverage detected