Spaces:
Paused
Paused
Update main.py
Browse files
main.py
CHANGED
|
@@ -139,7 +139,7 @@ async def read_root():
|
|
| 139 |
return HTMLResponse(content=html_content, status_code=200)
|
| 140 |
|
| 141 |
# 聊天完成处理
|
| 142 |
-
@app.post("/v1/chat/completions")
|
| 143 |
async def chat_completions(request: Request, background_tasks: BackgroundTasks):
|
| 144 |
"""
|
| 145 |
处理聊天完成请求
|
|
@@ -379,7 +379,7 @@ async def chat_completions(request: Request, background_tasks: BackgroundTasks):
|
|
| 379 |
raise HTTPException(status_code=500, detail=f"内部服务器错误: {str(exc)}")
|
| 380 |
|
| 381 |
# 图像生成处理
|
| 382 |
-
@app.post("/v1/images/generations")
|
| 383 |
async def images_generations(request: Request):
|
| 384 |
"""
|
| 385 |
处理图像生成请求
|
|
|
|
| 139 |
return HTMLResponse(content=html_content, status_code=200)
|
| 140 |
|
| 141 |
# 聊天完成处理
|
| 142 |
+
@app.post("/ai/v1/chat/completions")
|
| 143 |
async def chat_completions(request: Request, background_tasks: BackgroundTasks):
|
| 144 |
"""
|
| 145 |
处理聊天完成请求
|
|
|
|
| 379 |
raise HTTPException(status_code=500, detail=f"内部服务器错误: {str(exc)}")
|
| 380 |
|
| 381 |
# 图像生成处理
|
| 382 |
+
@app.post("/ai/v1/images/generations")
|
| 383 |
async def images_generations(request: Request):
|
| 384 |
"""
|
| 385 |
处理图像生成请求
|