From 4ead3c5b8059a55fa65f22b26c5763da0b1d5809 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Fri, 27 Sep 2024 19:43:40 +0200 Subject: [PATCH] chore: format --- backend/open_webui/apps/openai/main.py | 34 +++++++++++++------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/backend/open_webui/apps/openai/main.py b/backend/open_webui/apps/openai/main.py index 5768fe645..9d62f32d2 100644 --- a/backend/open_webui/apps/openai/main.py +++ b/backend/open_webui/apps/openai/main.py @@ -191,8 +191,8 @@ async def fetch_url(url, key): async def cleanup_response( - response: Optional[aiohttp.ClientResponse], - session: Optional[aiohttp.ClientSession], + response: Optional[aiohttp.ClientResponse], + session: Optional[aiohttp.ClientSession], ): if response: response.close() @@ -217,18 +217,18 @@ def merge_models_lists(model_lists): } for model in models if "api.openai.com" - not in app.state.config.OPENAI_API_BASE_URLS[idx] - or not any( - name in model["id"] - for name in [ - "babbage", - "dall-e", - "davinci", - "embedding", - "tts", - "whisper", - ] - ) + not in app.state.config.OPENAI_API_BASE_URLS[idx] + or not any( + name in model["id"] + for name in [ + "babbage", + "dall-e", + "davinci", + "embedding", + "tts", + "whisper", + ] + ) ] ) @@ -371,9 +371,9 @@ async def get_models(url_idx: Optional[int] = None, user=Depends(get_verified_us @app.post("/chat/completions") @app.post("/chat/completions/{url_idx}") async def generate_chat_completion( - form_data: dict, - url_idx: Optional[int] = None, - user=Depends(get_verified_user), + form_data: dict, + url_idx: Optional[int] = None, + user=Depends(get_verified_user), ): idx = 0 payload = {**form_data}