Integrate MusicGPT API generation into booth-musicgpt v0.7.0

This commit is contained in:
Troll (Hermes Agent) 2026-08-10 22:01:08 +00:00
parent 99855b1212
commit 2ca148be9b
12 changed files with 721 additions and 44 deletions

View file

@ -97,3 +97,15 @@ class Config:
# Package version, read from VERSION file.
VERSION = _load_version()
# MusicGPT API key (env only; never stored in repo).
MUSICGPT_API_KEY = os.environ.get('MUSICGPT_API_KEY', '')
# Available MusicGPT generation models.
MUSICGPT_MODELS = ['v6', 'v6-pro', 'v7', 'v7-pro']
MUSICGPT_DEFAULT_MODEL = os.environ.get('MUSICGPT_DEFAULT_MODEL', 'v7-pro')
@classmethod
def musicgpt_webhook_base_url(cls):
"""Return the public base URL used for MusicGPT webhooks."""
return cls.PUBLIC_BASE_URL.rstrip('/')