The Journal
The enumerations of the Smarter Journal: the record of every request to the Smarter api.
Each journal entry records the thing that a request was about, from SmarterJournalThings,
and the command that it ran, from SmarterJournalCliCommands. Every SAM kind is a thing,
so SmarterJournalThings takes its kinds from SAMKinds.
- class smarter_types.journal.SCLIResponseMetadata[source]
Bases:
objectThe keys of the
metadataof a journaled response of the cli api’sgetcommand.
- class smarter_types.journal.SmarterJournalApiResponseErrorKeys[source]
Bases:
objectThe keys of the
errorof a journaled response of the Smarter api.
- class smarter_types.journal.SmarterJournalApiResponseKeys[source]
Bases:
objectThe keys of a journaled response of the Smarter api.
- class smarter_types.journal.SmarterJournalCliCommands(*values)[source]
Bases:
SmarterEnumAbstractThe commands of the Smarter api’s
/api/v1/cli/endpoints, which the journal records.command = SmarterJournalCliCommands("apply") assert command == SmarterJournalCliCommands.APPLY
- classmethod choices() list[tuple[str, str]][source]
Return the choices of the platform’s journal model’s
commandfield, as Django expects them.The list is part of the platform’s database migrations, so it changes only with a migration.
- classmethod past_tense() dict[str, str][source]
Return the past tense of each command, for the messages of journaled responses.
- class smarter_types.journal.SmarterJournalThings(*values)[source]
Bases:
SmarterEnumAbstractThe kinds of objects (“things”) that the Smarter Journal records requests about.
Every SAM kind is a thing, with the same value. The one thing that is not a SAM kind is
PROMPT_CONFIG, a chat’s configuration, which the platform generates on request.thing = SmarterJournalThings("Plugin") assert thing == SmarterJournalThings.STATIC_PLUGIN assert thing.value == SAMKinds.STATIC_PLUGIN.value
- PROMPT_CONFIG = 'ChatConfig'
A chat’s configuration: a JSON object that the platform generates on request.
Not a SAM kind.