base_canonical
Base canonical module
Attributes
Classes
BaseCanonical
Bases: ABC
Attributes
name_pattern
class-attribute
instance-attribute
Functions
normalize_name
Some clients such as ST send chracter names with underscores instead of spaces. This is a common method that can normalize input names from clients to the name format compatible with the Eleanor framework.
Parameters:
-
name(str | None) –The name to be normalized.
Returns:
-
str(Optional[str]) –The normalized name with underscores replaced by spaces.
to_str
to_str(
data: CanonicalChat,
render_names: bool = False,
append_content: str = "",
append_eos: bool = False,
) -> str