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)
| 375 | |
| 376 | |
| 377 | def 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 | |
| 395 | def format_leaf_system_prompt(module_name: str, custom_instructions: str = None) -> str: |
no test coverage detected