tomoya преди 2 седмици
родител
ревизия
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: