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
072b499a
Commit
072b499a
authored
Mar 15, 2024
by
Timothy J. Baek
Browse files
fix: backslash rag content issue
parent
cd92cf0d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
backend/apps/rag/utils.py
backend/apps/rag/utils.py
+2
-3
No files found.
backend/apps/rag/utils.py
View file @
072b499a
...
...
@@ -91,9 +91,8 @@ def query_collection(
def
rag_template
(
template
:
str
,
context
:
str
,
query
:
str
):
template
=
re
.
sub
(
r
"\[context\]"
,
context
,
template
)
template
=
re
.
sub
(
r
"\[query\]"
,
query
,
template
)
template
=
template
.
replace
(
"[context]"
,
context
)
template
=
template
.
replace
(
"[query]"
,
query
)
return
template
...
...
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