浏览代码

chat_id非必传

zhangqian 1 年之前
父节点
当前提交
f80470593b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/api/files.py

+ 1 - 1
app/api/files.py

@@ -16,7 +16,7 @@ router = APIRouter()
 @router.post("/upload/{agent_id}", response_model=Response)
 async def upload_file(agent_id: str,
                       file: UploadFile = File(...),
-                      chat_id: str = Query(..., description="The ID of the chat"),
+                      chat_id: str = Query(None, description="The ID of the chat"),
                       db: Session = Depends(get_db),
                       current_user: UserModel = Depends(get_current_user)
                       ):