Naming Rules

Intent and Entity names must respect some constraints. check_name() documents and implements those constraints.

check_name(candidate_name, is_system=False)[source]

Raise ValueError if the given Intent or Entity name is not a valid name. Valid names

  • Only contain letter, underscore (_) and period (.) characters

  • Start with a letter

  • Don’t contain repeated underscores (e.g. __)

  • Don’t start wit i_. This is a reserved prefix for Intents system intents

Note that Agent.register will apply further checks to spot duplicate names. Note that names are case insensitive, and shouldn’t overlap with parameter names.

  • candidate_name (str) – The Intent or Entity name to check

  • is_system (bool) – When True, allow reserved names (those starting with i_)