ngdb.prompts
Provides a class that is the base for a prompt collection.
PromptCollection
PromptCollection()
Base class for classes that contain prompt/offset collections.
MAX_PROMPT_LENGTH
class-attribute
instance-attribute
MAX_PROMPT_LENGTH = 128
The maximum length of a prompt in a guide.
offsets
property
offsets
The offsets into the guide for each prompt.
prompts
property
prompts
The prompts in the collection.
__bool__
__bool__()
__getitem__
__getitem__(prompt)
__iter__
__iter__()
Get an iterator of prompt and offset pairs.
Yields:
Type | Description |
---|---|
Link
|
A link containing the prompt/offset, from the collection. |
__len__
__len__()