mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 12:25:20 +00:00
refac
This commit is contained in:
parent
f11bdc6ab5
commit
f71834720e
2 changed files with 4 additions and 2 deletions
|
|
@ -817,7 +817,7 @@ async def process_chat_payload(request, form_data, user, metadata, model):
|
||||||
|
|
||||||
oauth_token = None
|
oauth_token = None
|
||||||
try:
|
try:
|
||||||
oauth_token = await request.app.state.oauth_manager.get_oauth_token(
|
oauth_token = request.app.state.oauth_manager.get_oauth_token(
|
||||||
user.id, request.cookies.get("oauth_session_id", None)
|
user.id, request.cookies.get("oauth_session_id", None)
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,7 @@ async def get_tools(
|
||||||
oauth_token = None
|
oauth_token = None
|
||||||
try:
|
try:
|
||||||
oauth_token = (
|
oauth_token = (
|
||||||
await request.app.state.oauth_manager.get_oauth_token(
|
request.app.state.oauth_manager.get_oauth_token(
|
||||||
user.id,
|
user.id,
|
||||||
request.cookies.get("oauth_session_id", None),
|
request.cookies.get("oauth_session_id", None),
|
||||||
)
|
)
|
||||||
|
|
@ -715,6 +715,7 @@ async def execute_tool_server(
|
||||||
final_url,
|
final_url,
|
||||||
json=body_params,
|
json=body_params,
|
||||||
headers=headers,
|
headers=headers,
|
||||||
|
cookies=cookies,
|
||||||
ssl=AIOHTTP_CLIENT_SESSION_TOOL_SERVER_SSL,
|
ssl=AIOHTTP_CLIENT_SESSION_TOOL_SERVER_SSL,
|
||||||
) as response:
|
) as response:
|
||||||
if response.status >= 400:
|
if response.status >= 400:
|
||||||
|
|
@ -731,6 +732,7 @@ async def execute_tool_server(
|
||||||
async with request_method(
|
async with request_method(
|
||||||
final_url,
|
final_url,
|
||||||
headers=headers,
|
headers=headers,
|
||||||
|
cookies=cookies,
|
||||||
ssl=AIOHTTP_CLIENT_SESSION_TOOL_SERVER_SSL,
|
ssl=AIOHTTP_CLIENT_SESSION_TOOL_SERVER_SSL,
|
||||||
) as response:
|
) as response:
|
||||||
if response.status >= 400:
|
if response.status >= 400:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue