mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-11 20:05:19 +00:00
fix: multi-ollama mounted display issue
This commit is contained in:
parent
faf01bdeac
commit
1f91e5d3c6
1 changed files with 3 additions and 3 deletions
|
|
@ -415,15 +415,15 @@ async def get_all_models(request: Request, user: UserModel = None):
|
|||
try:
|
||||
loaded_models = await get_ollama_loaded_models(request, user=user)
|
||||
expires_map = {
|
||||
m["name"]: m["expires_at"]
|
||||
m["model"]: m["expires_at"]
|
||||
for m in loaded_models["models"]
|
||||
if "expires_at" in m
|
||||
}
|
||||
|
||||
for m in models["models"]:
|
||||
if m["name"] in expires_map:
|
||||
if m["model"] in expires_map:
|
||||
# Parse ISO8601 datetime with offset, get unix timestamp as int
|
||||
dt = datetime.fromisoformat(expires_map[m["name"]])
|
||||
dt = datetime.fromisoformat(expires_map[m["model"]])
|
||||
m["expires_at"] = int(dt.timestamp())
|
||||
except Exception as e:
|
||||
log.debug(f"Failed to get loaded models: {e}")
|
||||
|
|
|
|||
Loading…
Reference in a new issue