mirror of
https://git.mirrors.martin98.com/https://github.com/open-webui/open-webui
synced 2025-08-16 06:45:59 +08:00
refac
This commit is contained in:
parent
0a8cecfbfa
commit
72b2555953
@ -69,7 +69,10 @@ async def process_pipeline_inlet_filter(request, payload, user, models):
|
|||||||
async with aiohttp.ClientSession(trust_env=True) as session:
|
async with aiohttp.ClientSession(trust_env=True) as session:
|
||||||
for filter in sorted_filters:
|
for filter in sorted_filters:
|
||||||
urlIdx = filter.get("urlIdx")
|
urlIdx = filter.get("urlIdx")
|
||||||
if urlIdx is None:
|
|
||||||
|
try:
|
||||||
|
urlIdx = int(urlIdx)
|
||||||
|
except:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
url = request.app.state.config.OPENAI_API_BASE_URLS[urlIdx]
|
url = request.app.state.config.OPENAI_API_BASE_URLS[urlIdx]
|
||||||
@ -119,7 +122,10 @@ async def process_pipeline_outlet_filter(request, payload, user, models):
|
|||||||
async with aiohttp.ClientSession(trust_env=True) as session:
|
async with aiohttp.ClientSession(trust_env=True) as session:
|
||||||
for filter in sorted_filters:
|
for filter in sorted_filters:
|
||||||
urlIdx = filter.get("urlIdx")
|
urlIdx = filter.get("urlIdx")
|
||||||
if urlIdx is None:
|
|
||||||
|
try:
|
||||||
|
urlIdx = int(urlIdx)
|
||||||
|
except:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
url = request.app.state.config.OPENAI_API_BASE_URLS[urlIdx]
|
url = request.app.state.config.OPENAI_API_BASE_URLS[urlIdx]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user