mirror of
https://github.com/open-webui/open-webui
synced 2025-02-16 18:22:29 +00:00
fix: custom model action button issue
This commit is contained in:
parent
1294ba9d61
commit
dce91a8557
@ -375,7 +375,7 @@ else:
|
|||||||
AIOHTTP_CLIENT_TIMEOUT_OPENAI_MODEL_LIST
|
AIOHTTP_CLIENT_TIMEOUT_OPENAI_MODEL_LIST
|
||||||
)
|
)
|
||||||
except Exception:
|
except Exception:
|
||||||
AIOHTTP_CLIENT_TIMEOUT_OPENAI_MODEL_LIST = None
|
AIOHTTP_CLIENT_TIMEOUT_OPENAI_MODEL_LIST = 3
|
||||||
|
|
||||||
####################################
|
####################################
|
||||||
# OFFLINE_MODE
|
# OFFLINE_MODE
|
||||||
|
@ -990,11 +990,13 @@ async def get_all_models():
|
|||||||
owned_by = model["owned_by"]
|
owned_by = model["owned_by"]
|
||||||
if "pipe" in model:
|
if "pipe" in model:
|
||||||
pipe = model["pipe"]
|
pipe = model["pipe"]
|
||||||
|
|
||||||
if "info" in model and "meta" in model["info"]:
|
|
||||||
action_ids.extend(model["info"]["meta"].get("actionIds", []))
|
|
||||||
break
|
break
|
||||||
|
|
||||||
|
if custom_model.meta:
|
||||||
|
meta = custom_model.meta.model_dump()
|
||||||
|
if "actionIds" in meta:
|
||||||
|
action_ids.extend(meta["actionIds"])
|
||||||
|
|
||||||
models.append(
|
models.append(
|
||||||
{
|
{
|
||||||
"id": custom_model.id,
|
"id": custom_model.id,
|
||||||
@ -2385,7 +2387,7 @@ async def oauth_callback(provider: str, request: Request, response: Response):
|
|||||||
key="token",
|
key="token",
|
||||||
value=jwt_token,
|
value=jwt_token,
|
||||||
httponly=True, # Ensures the cookie is not accessible via JavaScript
|
httponly=True, # Ensures the cookie is not accessible via JavaScript
|
||||||
samesite=WEBUI_SESSION_COOKIE_SAME_SITE,
|
samesite=WEBUI_SESSION_COOKIE_SAME_SITE,
|
||||||
secure=WEBUI_SESSION_COOKIE_SECURE,
|
secure=WEBUI_SESSION_COOKIE_SECURE,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user