Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
b5b2b70f
Commit
b5b2b70f
authored
Jun 02, 2024
by
Jun Siang Cheah
Browse files
fix: bad payload refactor
parent
7f74426a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
backend/apps/openai/main.py
backend/apps/openai/main.py
+4
-1
No files found.
backend/apps/openai/main.py
View file @
b5b2b70f
...
@@ -443,7 +443,10 @@ async def proxy(path: str, request: Request, user=Depends(get_verified_user)):
...
@@ -443,7 +443,10 @@ async def proxy(path: str, request: Request, user=Depends(get_verified_user)):
try
:
try
:
session
=
aiohttp
.
ClientSession
()
session
=
aiohttp
.
ClientSession
()
r
=
await
session
.
request
(
r
=
await
session
.
request
(
method
=
request
.
method
,
url
=
target_url
,
data
=
payload
,
headers
=
headers
method
=
request
.
method
,
url
=
target_url
,
data
=
payload
if
payload
else
body
,
headers
=
headers
,
)
)
r
.
raise_for_status
()
r
.
raise_for_status
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment