mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-07 02:58:21 +00:00
fix: use path converter for model ID routes in analytics to support slashes (#22382)
This commit is contained in:
parent
d7efdcce2b
commit
9a269ec8ab
1 changed files with 2 additions and 2 deletions
|
|
@ -278,7 +278,7 @@ class ModelChatsResponse(BaseModel):
|
|||
total: int
|
||||
|
||||
|
||||
@router.get("/models/{model_id}/chats", response_model=ModelChatsResponse)
|
||||
@router.get("/models/{model_id:path}/chats", response_model=ModelChatsResponse)
|
||||
async def get_model_chats(
|
||||
model_id: str,
|
||||
start_date: Optional[int] = Query(None),
|
||||
|
|
@ -367,7 +367,7 @@ class ModelOverviewResponse(BaseModel):
|
|||
tags: list[TagEntry]
|
||||
|
||||
|
||||
@router.get("/models/{model_id}/overview", response_model=ModelOverviewResponse)
|
||||
@router.get("/models/{model_id:path}/overview", response_model=ModelOverviewResponse)
|
||||
async def get_model_overview(
|
||||
model_id: str,
|
||||
days: int = Query(30, description="Number of days of history (0 for all)"),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue