Files
yingqing/core/backend
zycandClaude Opus 4.8 a7f1b0da1e fix(core): 脚本 agent 兼容模型 ScriptDraft/shots 变体,修旁白/画面全空
豆包 Doubao-Seed-2.0-Lite 常不按扁平契约输出,而是回
{"ScriptDraft":{"basicInfo":...,"shots":[{scene,dialogue,subtitle}]}}。
normalize_draft 在顶层找不到 segments → 走补占位镜兜底 → 旁白/画面全空(只剩 role)。

normalize_draft 增加容错:
- 解开 {"ScriptDraft":{...}} 外壳;basicInfo 的 camelCase 时长/比例拍平
- shots → segments;每镜 scene→画面、dialogue/subtitle→旁白
- 防 dialogue 为整句字符串时被逐字符遍历
原扁平契约路径不受影响。新增 apps/ai/tests.py 3 个回归用例,全套 21 测试通过。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 10:09:09 +08:00
..

AirShelf Backend

All backend code lives under AirShelf/core/backend by project decision.

Local bootstrap

cd /Users/maidong/Desktop/zyc/qiyuan_gitea/AirShelf/core/backend
python3.12 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
python manage.py migrate
python manage.py runserver 0.0.0.0:8000

Start workers in separate terminals:

cd /Users/maidong/Desktop/zyc/qiyuan_gitea/AirShelf/core/backend
source .venv/bin/activate
celery -A airshelf worker -l info

ffmpeg must be available on PATH for Stage5 export jobs.

Runtime layout

  • Django project: airshelf
  • Domain apps: apps/*
  • Settings module: airshelf.settings.development
  • Celery app: airshelf.celery

Secrets must be supplied by environment variables or .env; never commit values from account.md.

Useful commands

python manage.py check
python manage.py makemigrations --check --dry-run
python manage.py migrate
python manage.py bootstrap_volcano_models
python manage.py test apps.accounts apps.projects apps.billing