Const

Constants for the plugin app.

smarter.apps.llmtool.const.OFFICIAL_EXTENSIONS = ('calculator', 'date-calculator', 'weather')

The slugs of the official Smarter Extensions, which manage.py install_official_extensions installs from the registry.

('calculator', 'date-calculator', 'weather')
class smarter.apps.llmtool.const.PluginCacheTtl(*values)[source]

Bases: IntEnum

Seconds to cache the results of each kind of plugin’s remote calls, with @cache_results.

Each TTL reflects how quickly the remote data is expected to change. The ImageSearch and Websearch values are the defaults of the manifest’s cacheTtl, which a plugin may override.

API = 3600

An ApiPlugin’s GET responses.

Other methods may change something, so they are never cached.

DEFAULT = 3600

The default TTL for a plugin’s remote calls to safe_http.py, if the plugin does not specify a cacheTtl in its manifest.

An ImageSearchPlugin’s Brave Image Search API responses.

SKILL = 259200

A SkillPlugin’s remote skill, retrieved from GitHub or another https host.

SQL = 3600

A SqlPlugin’s query results.

WEBSEARCH = 3600

A WebsearchPlugin’s search results and web pages.

WEBSEARCH_ROBOTS_TXT = 3600

The robots.txt files that a WebsearchPlugin obeys.