_resolve_prompt_template
Internal helper
This page documents an internal implementation helper, not a primary public API.
Source code in src/fabricops_kit/ai.py
| def _resolve_prompt_template(config: FrameworkConfig | None, template_name: str, fallback_template: str) -> str:
if config is None:
return fallback_template
ai_prompt_config = getattr(config, "ai_prompt_config", None)
configured_template = getattr(ai_prompt_config, template_name, "") if ai_prompt_config is not None else ""
return configured_template or fallback_template
|