- таблица sections (дерево через parent_id), у видео section_id
- API: CRUD /sections, фильтры /videos (поиск, раздел с потомками, метод),
GET /videos/{id}/text, PATCH раздела, DELETE вместе с файлами
- pipeline: keep_video=false удаляет mp4 после расшифровки, section_id
- UI: панель разделов с вложенностью и счётчиками, поиск, фильтр по методу,
диалоги полного текста/выжимки, привязка к разделу, удаление,
переключатель «Сохранять видео на диске»
- compose: bind-mount ./web для правок без пересборки
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
30 lines
683 B
Python
30 lines
683 B
Python
import logging
|
|
from contextlib import asynccontextmanager
|
|
|
|
from fastapi import FastAPI
|
|
|
|
from api.db.connection import wait_for_postgres, init_db
|
|
from api.route import default, llm, pipeline, sections, videos
|
|
|
|
|
|
logging.basicConfig(
|
|
level=logging.INFO,
|
|
format="%(asctime)s %(levelname)s %(name)s: %(message)s",
|
|
)
|
|
|
|
|
|
@asynccontextmanager
|
|
async def lifespan(app: FastAPI):
|
|
await wait_for_postgres()
|
|
await init_db()
|
|
yield
|
|
|
|
|
|
app = FastAPI(title="LLM-infa API", version="0.3.0", lifespan=lifespan)
|
|
|
|
app.include_router(default.router)
|
|
app.include_router(pipeline.router)
|
|
app.include_router(videos.router)
|
|
app.include_router(sections.router)
|
|
app.include_router(llm.router)
|