Journal Enumerations
Smarter API Manifests Enumerations.
- class smarter.lib.journal.enum.SmarterJournalCliCommands(*values)[source]
Bases:
SmarterEnumAbstractEnumerates the available commands for
api/v1/clirequests.This class inherits from
SmarterEnumAbstract, which is typically implemented as a subclassed Singleton. For flexibility, it also allows instantiation with a string value, enabling aSmarterJournalCliCommandsvalue to be passed as a strongly typed object.Each member represents a supported CLI command in the Smarter API, such as
apply,chat,delete,deploy, etc.Example usage:
command = SmarterJournalCliCommands("apply") assert command == SmarterJournalCliCommands.APPLY
- APPLY = 'apply'
- CHAT = 'chat'
- CHAT_CONFIG = 'chat_config'
- DELETE = 'delete'
- DEPLOY = 'deploy'
- DESCRIBE = 'describe'
- ENABLE_JOURNAL = 'journal'
- GET = 'get'
- LOGS = 'logs'
- MANIFEST_EXAMPLE = 'example_manifest'
- SCHEMA = 'schema'
- STATUS = 'status'
- UNDEPLOY = 'undeploy'
- VERSION = 'version'
- WHOAMI = 'whoami'
- classmethod from_url(url)[source]
Parse a url and return the SmarterJournalCliCommands enum value if it exists in the url path. example: http://localhost:9357/api/v1/cli/example_manifest/Account/
- class smarter.lib.journal.enum.SmarterJournalThings(*values)[source]
Bases:
SmarterEnumAbstractEnumerates the types of objects (“things”) that can be added to the Smarter Journal.
This class descends from
SmarterEnumAbstract, typically implemented as a subclassed Singleton. For flexibility, it also allows instantiation with a string value, enabling aSmarterJournalThingsvalue to be passed as a strongly typed object.Each member represents a resource type within the Smarter API, such as plugins, connections, accounts, authentication tokens, users, chats, providers, and secrets.
Example usage:
thing = SmarterJournalThings("Plugin") assert thing == SmarterJournalThings.STATIC_PLUGIN
- ACCOUNT = 'Account'
Smarter Account resource. A Django ORM model instance.
- API_CONNECTION = 'ApiConnection'
Smarter API Connection resource. A Django ORM model instance.
- API_PLUGIN = 'ApiPlugin'
Smarter API Plugin AI resource. A Django ORM model instance.
- AUTH_TOKEN = 'SmarterAuthToken'
Smarter Authentication Token resource. A Django DRF Knox subclass ORM model instance.
- CHAT = 'Chat'
Smarter Chat resource. A Django ORM model instance.
- CHATBOT = 'Chatbot'
Smarter Chatbot resource. A Django ORM model instance.
- CHAT_CONFIG = 'ChatConfig'
Smarter ChatConfig resource. A JSON dictionary generated real-time
- CHAT_HISTORY = 'ChatHistory'
Smarter ChatHistory resource. A list of Django ORM model instances.
- CHAT_PLUGIN_USAGE = 'ChatPluginUsage'
Smarter ChatPluginUsage resource. A list of Django ORM model instances.
- CHAT_TOOL_CALL = 'ChatToolCall'
Smarter ChatToolCall resource. A list of Django ORM model instances.
- PROVIDER = 'Provider'
Smarter Provider resource. A Django ORM model instance.
- SECRET = 'Secret'
Smarter Secret resource. A Django ORM model instance.
- SQL_CONNECTION = 'SqlConnection'
Smarter SQL Connection resource. A Django ORM model instance.
- SQL_PLUGIN = 'SqlPlugin'
Smarter SQL Plugin AI resource. A Django ORM model instance.
- STATIC_PLUGIN = 'Plugin'
Smarter Static Plugin AI resource. A collection of Django ORM model instances.
- USER = 'User'
Smarter User resource. A Django Auth User model instance.
- VECTORSTORE = 'Vectorstore'
Smarter Vectorstore resource. A Django ORM model instance.