Text-generation-specific model constants, enums, and descriptors.
_TEXT_BACKEND_REGISTRY
module-attribute
_TEXT_BACKEND_REGISTRY = EnumRegistry(
(value) for item in TEXT_BACKENDS
)
KNOWN_TEXT_BACKENDS
module-attribute
KNOWN_TEXT_BACKENDS = mutable_values()
TEXT_BACKENDS
Bases: StrEnum
An enum of all the text backends.
Source code in src/horde_model_reference/model_consts/text.py
| class TEXT_BACKENDS(StrEnum):
"""An enum of all the text backends."""
aphrodite = auto()
koboldcpp = auto()
|
aphrodite
class-attribute
instance-attribute
koboldcpp
class-attribute
instance-attribute
register_text_backend
register_text_backend(backend: str) -> None
Register a new text backend.
Parameters:
-
backend
(str)
–
The text backend to register.
Source code in src/horde_model_reference/model_consts/text.py
| def register_text_backend(backend: str) -> None:
"""Register a new text backend.
Args:
backend: The text backend to register.
"""
_TEXT_BACKEND_REGISTRY.register(backend)
|
is_known_text_backend
is_known_text_backend(backend: str) -> bool
Check if a text backend is known.
Parameters:
-
backend
(str)
–
The text backend to check.
Returns:
-
bool
–
True if the text backend is known, False otherwise.
Source code in src/horde_model_reference/model_consts/text.py
| def is_known_text_backend(backend: str) -> bool:
"""Check if a text backend is known.
Args:
backend: The text backend to check.
Returns:
True if the text backend is known, False otherwise.
"""
return _TEXT_BACKEND_REGISTRY.is_known(backend)
|