From e19554e9a8c9c2259527e44660eb9826557070be Mon Sep 17 00:00:00 2001 From: Juan Calderon-Perez Date: Fri, 18 Apr 2025 09:26:57 -0400 Subject: [PATCH] Simplify import --- backend/open_webui/main.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/open_webui/main.py b/backend/open_webui/main.py index 87eaa865f..8c16bb837 100644 --- a/backend/open_webui/main.py +++ b/backend/open_webui/main.py @@ -11,8 +11,7 @@ import random from contextlib import asynccontextmanager from urllib.parse import urlencode, parse_qs, urlparse -import anyio -import anyio.to_thread +from anyio import to_thread from pydantic import BaseModel from sqlalchemy import text @@ -440,7 +439,7 @@ async def lifespan(app: FastAPI): pool_size = THREAD_POOL_SIZE if pool_size and pool_size > 0: - anyio.to_thread.current_default_thread_limiter().total_tokens = pool_size + to_thread.current_default_thread_limiter().total_tokens = pool_size asyncio.create_task(periodic_usage_pool_cleanup()) yield