Format the leaf 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 leaf system prompt string
(module_name: str, custom_instructions: str = None)
| 393 | |
| 394 | |
| 395 | def format_leaf_system_prompt(module_name: str, custom_instructions: str = None) -> str: |
| 396 | """ |
| 397 | Format the leaf system prompt with module name and optional custom instructions. |
| 398 | |
| 399 | Args: |
| 400 | module_name: Name of the module to document |
| 401 | custom_instructions: Optional custom instructions to append |
| 402 | |
| 403 | Returns: |
| 404 | Formatted leaf system prompt string |
| 405 | """ |
| 406 | custom_section = "" |
| 407 | if custom_instructions: |
| 408 | custom_section = f"\n\n<CUSTOM_INSTRUCTIONS>\n{custom_instructions}\n</CUSTOM_INSTRUCTIONS>" |
| 409 | |
| 410 | return LEAF_SYSTEM_PROMPT.format(module_name=module_name, custom_instructions=custom_section).strip() |
no test coverage detected