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
1a93021c
"git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "3af8d16e6ad24f7a5fd5c6de30fb61b31e62f1c8"
Commit
1a93021c
authored
Mar 09, 2024
by
Timothy J. Baek
Browse files
fix: log modified messages
parent
d40edc09
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
backend/main.py
backend/main.py
+2
-0
No files found.
backend/main.py
View file @
1a93021c
...
@@ -160,6 +160,8 @@ class RAGMiddleware(BaseHTTPMiddleware):
...
@@ -160,6 +160,8 @@ class RAGMiddleware(BaseHTTPMiddleware):
data
[
"messages"
][
last_user_message_idx
]
=
new_user_message
data
[
"messages"
][
last_user_message_idx
]
=
new_user_message
del
data
[
"docs"
]
del
data
[
"docs"
]
print
(
data
[
"messages"
])
modified_body_bytes
=
json
.
dumps
(
data
).
encode
(
"utf-8"
)
modified_body_bytes
=
json
.
dumps
(
data
).
encode
(
"utf-8"
)
# Create a new request with the modified body
# Create a new request with the modified body
...
...
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