Slot Responses#
Slot-related responses.
- class FilledTemplate(**data)[source]#
Bases:
BaseResponseFill template with slot values. The text attribute of the template message should be a format-string: e.g. “Your username is {profile.username}”.
For the example above, if
profile.usernameslot has value “admin”, it would return a copy of the message with the following text: “Your username is admin”.-
template:
Union[Message,dict[dict],str[str],BaseResponse]# A response to use as a template.
-
on_exception:
Literal['keep_template','return_none']# What to do if template filling fails.
“keep_template”:
templateis returned, unfilled.“return_none”: an empty message is returned.
- classmethod validate_template(template)[source]#
- Return type:
Union[ConstResponse,BaseResponse]
-
template: