definition
¶
BracketedDefinition
¶
BracketedDefinition(
name: Optional[String] = None,
desc: Optional[String] = None,
*,
sep: String = ": ",
details: Any = None,
fstr: Optional[str] = None,
var_name: Optional[str] = None
)
Bases: Definition
A Definition that is formatted with square brackets.
Parameters:
-
name
(Optional[String]
, default:None
) –The name of the definition.
-
desc
(Optional[String]
, default:None
) –A description of the definition.
-
sep
(String
, default:': '
) –The separator between the name and description.
-
details
(Any
, default:None
) –Additional details about the definition.
-
fstr
(Optional[str]
, default:None
) –The format string for the definition.
-
var_name
(Optional[str]
, default:None
) –The name of the variable that the definition is stored in.
Source code in src/appl/core/promptable/definition.py
Definition
¶
Definition(
name: Optional[String] = None,
desc: Optional[String] = None,
*,
sep: String = ": ",
details: Any = None,
fstr: Optional[str] = None,
var_name: Optional[str] = None
)
Bases: Promptable
, Formattable
Represent a definition of a concept.
Attributes:
-
fstr
(str
) –The format string for the definition.
-
name
(Optional[String]
) –The name of the definition.
-
desc
(String
) –A description of the definition.
-
_forks
(List[Definition]
) –A list of all instances of this class.
Parameters:
-
name
(Optional[String]
, default:None
) –The name of the definition.
-
desc
(Optional[String]
, default:None
) –A description of the definition.
-
sep
(String
, default:': '
) –The separator between the name and description.
-
details
(Any
, default:None
) –Additional details about the definition.
-
fstr
(Optional[str]
, default:None
) –The format string for the definition.
-
var_name
(Optional[str]
, default:None
) –The name of the variable that the definition is stored in.
Source code in src/appl/core/promptable/definition.py
define
¶
Create a new Definition subclass with the given name and format string.
define_bracketed
¶
Create a new BracketedDefinition subclass with the given name.