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
9f58ed5a
"...resnet50_tensorflow.git" did not exist on "d2902b5d644c8b778855f7415175a0b61287b064"
Commit
9f58ed5a
authored
Mar 08, 2024
by
Timothy J. Baek
Browse files
fix
parent
dfcc3142
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
backend/main.py
backend/main.py
+2
-4
No files found.
backend/main.py
View file @
9f58ed5a
...
@@ -61,13 +61,11 @@ async def on_startup():
...
@@ -61,13 +61,11 @@ async def on_startup():
class
RAGMiddleware
(
BaseHTTPMiddleware
):
class
RAGMiddleware
(
BaseHTTPMiddleware
):
async
def
dispatch
(
self
,
request
:
Request
,
call_next
):
async
def
dispatch
(
self
,
request
:
Request
,
call_next
):
"chat/completions"
in
request
.
url
.
path
print
(
request
.
url
.
path
)
if
request
.
method
==
"POST"
and
(
if
request
.
method
==
"POST"
and
(
"/api/chat"
in
request
.
url
.
path
or
"/chat/completions"
in
request
.
url
.
path
"/api/chat"
in
request
.
url
.
path
or
"/chat/completions"
in
request
.
url
.
path
):
):
print
(
request
.
url
.
path
)
# Read the original request body
# Read the original request body
body
=
await
request
.
body
()
body
=
await
request
.
body
()
# Decode body to string
# Decode body to string
...
...
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