MCPcopy Create free account
hub / github.com/TheSmallHanCat/flow2api / update_generation_config

Function update_generation_config

src/api/admin.py:1372–1386  ·  view source on GitHub ↗

Update generation timeout configuration

(
    request: GenerationConfigRequest,
    token: str = Depends(verify_admin_token)
)

Source from the content-addressed store, hash-verified

1370
1371@router.post("/api/config/generation")
1372async def update_generation_config(
1373 request: GenerationConfigRequest,
1374 token: str = Depends(verify_admin_token)
1375):
1376 """Update generation timeout configuration"""
1377 await db.update_generation_config(
1378 image_timeout=request.image_timeout,
1379 video_timeout=request.video_timeout,
1380 max_retries=request.max_retries,
1381 )
1382
1383 # 🔥 Hot reload: sync database config to memory
1384 await db.reload_config_to_memory()
1385
1386 return {"success": True, "message": "生成配置更新成功"}
1387
1388
1389@router.get("/api/call-logic/config")

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected