mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 21:05:19 +00:00
enh: v1 endpoint support
This commit is contained in:
parent
497471d16b
commit
32a022a823
1 changed files with 3 additions and 0 deletions
|
|
@ -1261,6 +1261,7 @@ if audit_level != AuditLevel.NONE:
|
|||
|
||||
|
||||
@app.get("/api/models")
|
||||
@app.get("/api/v1/models") # Experimental: Compatibility with OpenAI API
|
||||
async def get_models(
|
||||
request: Request, refresh: bool = False, user=Depends(get_verified_user)
|
||||
):
|
||||
|
|
@ -1341,6 +1342,7 @@ async def get_base_models(request: Request, user=Depends(get_admin_user)):
|
|||
|
||||
|
||||
@app.post("/api/embeddings")
|
||||
@app.post("/api/v1/embeddings") # Experimental: Compatibility with OpenAI API
|
||||
async def embeddings(
|
||||
request: Request, form_data: dict, user=Depends(get_verified_user)
|
||||
):
|
||||
|
|
@ -1367,6 +1369,7 @@ async def embeddings(
|
|||
|
||||
|
||||
@app.post("/api/chat/completions")
|
||||
@app.post("/api/v1/chat/completions") # Experimental: Compatibility with OpenAI API
|
||||
async def chat_completion(
|
||||
request: Request,
|
||||
form_data: dict,
|
||||
|
|
|
|||
Loading…
Reference in a new issue