tomoya 10 ヶ月 前
コミット
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: