pyaiml21.botconfig.config.BotConfig¶
- class pyaiml21.botconfig.config.BotConfig(predicate_defaults: typing.Dict[str, str] = <factory>, sets: typing.Dict[str, typing.Set[str]] = <factory>, maps: typing.Dict[str, typing.Mapping[str, str]] = <factory>, gossip_filename: typing.Optional[str] = None, learnf_file: str = './learnf.aiml')[source][source]¶
Dataclass that contains all configuration files of the bot.
The only missing is its knowledge (which is saved in the graphmaster).
Methods
Attributes
Reply returned when the interpretation fails.
Default value of the _predicate.
Substitutions used with <denormalize> tag.
Substitutions used with <gender> tag.
Absolute path to file where to store <gossip/>.
Path to file where to store <learnf/>.
Substitutions used with <normalize> tag.
Substitutions used with <person> tag.
Substitutions used with <person2> tag.
Bot properties.
Default values for the predicates.
Mapping from set name to the set - AIML 2.x sets.
Mapping from map name to the map - AIML 2.x maps.
- default_answer = 'I have no answer for that.'[source]¶
Reply returned when the interpretation fails.
- default_predicate = 'unknown'[source]¶
Default value of the _predicate.
When no _predicate with corresponding name is found in session.predicates or in self.predicate_defaults, this is the value that will be used.
- denormalize = <pyaiml21.botconfig.substitutions.Substitutions object>[source]¶
Substitutions used with <denormalize> tag.
- gender = <pyaiml21.botconfig.substitutions.Substitutions object>[source]¶
Substitutions used with <gender> tag.
- gossip_filename: Optional[str] = None[source]¶
Absolute path to file where to store <gossip/>.
If no path is provided, the contents of <gossip> are discarded, as this tag produces no output. The file be be created, if not exists at the first encounter of <gossip> tag.
- learnf_file: str = './learnf.aiml'[source]¶
Path to file where to store <learnf/>.
This file, if not exists, will be created at the first encounter of <learnf/> tag during evaluation.
- maps: Dict[str, Mapping[str, str]][source]¶
Mapping from map name to the map - AIML 2.x maps.
Bot’s maps. Used at the evaluation of <map> tag. As the argument of dictionary has type mapping, it is enough to provide an object inheriting from collections.abs.Mapping, e.g. see implementation of standard maps in /stdlib/.
- normalize = <pyaiml21.botconfig.substitutions.Substitutions object>[source]¶
Substitutions used with <normalize> tag.
- person = <pyaiml21.botconfig.substitutions.Substitutions object>[source]¶
Substitutions used with <person> tag.
- person2 = <pyaiml21.botconfig.substitutions.Substitutions object>[source]¶
Substitutions used with <person2> tag.