PromptRegistry
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| BaseRegistry llmling.core.baseregistry Base class for registries providing item storage and change notifications. |
||
| CompletionProvider llmling.completions.protocols Protocol for completion providers. |
⋔ Inheritance diagram¶
graph TD
3551443770["registry.PromptRegistry"]
1668955754["baseregistry.BaseRegistry"]
1799060090["abc.MutableMapping"]
4016029557["abc.Mapping"]
2852422536["abc.Collection"]
4051874921["abc.Sized"]
2751680898["builtins.object"]
2021119437["abc.Iterable"]
1031828782["abc.Container"]
925645236["abc.ABC"]
3481597255["typing.Generic"]
2180369605["protocols.CompletionProvider"]
1073422405["typing.Protocol"]
1668955754 --> 3551443770
1799060090 --> 1668955754
4016029557 --> 1799060090
2852422536 --> 4016029557
4051874921 --> 2852422536
2751680898 --> 4051874921
2021119437 --> 2852422536
2751680898 --> 2021119437
1031828782 --> 2852422536
2751680898 --> 1031828782
925645236 --> 1668955754
2751680898 --> 925645236
3481597255 --> 1668955754
2751680898 --> 3481597255
2180369605 --> 3551443770
1073422405 --> 2180369605
3481597255 --> 1073422405
🛈 DocStrings¶
Bases: BaseRegistry[str, BasePrompt], CompletionProvider
Registry for prompt templates.
Source code in src/llmling/prompts/registry.py
get_completions
async
¶
Get completions for a prompt argument.
Source code in src/llmling/prompts/registry.py
register
¶
register(key: str, item: BasePrompt, replace: bool = False) -> None
Register prompt with its key as name.
register_function
¶
register_function(
fn: Callable[..., Any] | str, name: str | None = None, *, replace: bool = False
) -> None
Register a function as a prompt.