prompt_registry
Prompt profile registry for GenAI processes.
PromptTemplate
Bases: BaseModel
Immutable prompt template with versioned metadata.
PromptProfileRegistry
Registry of prompt bundles by profile and version.
register_bundle
classmethod
register_bundle(
profile: str,
version: str,
templates: dict[str, str | dict[str, str]],
*,
metadata: dict[str, Any] | None = None,
set_default: bool = False
) -> None
Register a prompt bundle for a profile/version pair.
Source code in cltk/genai/prompt_registry.py
get_prompt
classmethod
Return the prompt template for a profile/process/version.
Source code in cltk/genai/prompt_registry.py
list_profiles
classmethod
list_versions
classmethod
build_prompt_info
build_prompt_info(
template: PromptTemplate,
*,
variant: str | None = None,
**kwargs: Any
) -> PromptInfo
Render a PromptTemplate into a PromptInfo payload.