generation
Generation-domain helpers for the webapp API.
This module owns class/syllable mapping rules, package option discovery,
selection statistics, and deterministic sampling behavior used by
/api/generate and related generation endpoints.
Functions
|
Return cached generation package options for one database path. |
|
Clear cached generation package options for one DB or all DBs. |
Module Contents
- generation.get_cached_generation_package_options(conn, *, db_path)
Return cached generation package options for one database path.
- Parameters:
conn (sqlite3.Connection) – Open SQLite connection to the target database.
db_path (pathlib.Path) – Filesystem path of the SQLite database.
- Returns:
Cached or freshly computed package option payload.
- Return type:
- generation.clear_generation_package_options_cache(db_path=None)
Clear cached generation package options for one DB or all DBs.
- Parameters:
db_path (pathlib.Path | None) – Optional database path. When omitted, clears all cache entries.