Integrate MusicGPT API generation into booth-musicgpt v0.7.0
This commit is contained in:
parent
99855b1212
commit
2ca148be9b
12 changed files with 721 additions and 44 deletions
12
config.py
12
config.py
|
|
@ -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('/')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue