mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
refac: optimisation
This commit is contained in:
@@ -6,7 +6,10 @@ from pathlib import Path
|
||||
from typing import Literal, Optional, overload
|
||||
|
||||
import aiohttp
|
||||
from aiocache import cached
|
||||
import requests
|
||||
|
||||
|
||||
from open_webui.apps.webui.models.models import Models
|
||||
from open_webui.config import (
|
||||
CACHE_DIR,
|
||||
@@ -325,6 +328,7 @@ async def get_all_models_responses() -> list:
|
||||
return responses
|
||||
|
||||
|
||||
@cached(ttl=3)
|
||||
async def get_all_models() -> dict[str, list]:
|
||||
log.info("get_all_models()")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user