瀏覽代碼

mod text2zip

tomoya 6 月之前
父節點
當前提交
ac603b665c
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      backend/app/app/api/api_v1/endpoints/text2zip.py

+ 2 - 2
backend/app/app/api/api_v1/endpoints/text2zip.py

@@ -1,4 +1,4 @@
-from typing import Any, List, Optional
+from typing import Any, List, Optional, Literal
 from datetime import datetime
 from datetime import datetime
 from fastapi import APIRouter, Body, Depends, HTTPException, Form, status, Response, BackgroundTasks
 from fastapi import APIRouter, Body, Depends, HTTPException, Form, status, Response, BackgroundTasks
 from fastapi.encoders import jsonable_encoder
 from fastapi.encoders import jsonable_encoder
@@ -95,7 +95,7 @@ def generate_zip(
       *,
       *,
     background_tasks: BackgroundTasks,
     background_tasks: BackgroundTasks,
     current_user: models.User = Depends(deps.get_current_active_user),
     current_user: models.User = Depends(deps.get_current_active_user),
-    model:Optional[str], 
+    model:Literal['sd3', 'flux']="sd3", 
     texts:List[str]):
     texts:List[str]):
 
 
     if not model:
     if not model: