MCPcopy Create free account
hub / github.com/SkyworkAI/DeepResearchAgent / get_system_message

Method get_system_message

src/prompt/context.py:943–964  ·  view source on GitHub ↗

Get a system message using SystemPrompt. Args: prompt_name: Name of the prompt (e.g., "tool_calling"). If None, will try to infer from kwargs or use default. modules: Modules to render in the template reload: Whether to re

(self, 
                          prompt_name: Optional[str] = None,
                          modules: Dict[str, Any] = None, 
                          reload: bool = False, 
                          **kwargs)

Source from the content-addressed store, hash-verified

941 return False
942
943 async def get_system_message(self,
944 prompt_name: Optional[str] = None,
945 modules: Dict[str, Any] = None,
946 reload: bool = False,
947 **kwargs):
948 """Get a system message using SystemPrompt.
949
950 Args:
951 prompt_name: Name of the prompt (e.g., "tool_calling").
952 If None, will try to infer from kwargs or use default.
953 modules: Modules to render in the template
954 reload: Whether to reload the prompt
955 **kwargs: Additional arguments (may include prompt_name for backward compatibility)
956 """
957 prompt_name = f"{prompt_name}_system_prompt"
958 prompt_info = await self.get_info(prompt_name)
959
960 version = prompt_info.version
961 prompt_instance = prompt_info.instance
962 logger.info(f"| ✅ Using prompt {prompt_name}@{version}")
963
964 return await prompt_instance.get_message(modules, reload, **kwargs)
965
966 async def get_agent_message(self,
967 prompt_name: Optional[str] = None,

Callers 1

get_messagesMethod · 0.95

Calls 3

get_infoMethod · 0.95
infoMethod · 0.45
get_messageMethod · 0.45

Tested by

no test coverage detected