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
07b45199
Commit
07b45199
authored
Feb 17, 2024
by
Timothy J. Baek
Browse files
feat: reset rag template
parent
a31feccd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
backend/apps/rag/main.py
backend/apps/rag/main.py
+3
-1
No files found.
backend/apps/rag/main.py
View file @
07b45199
...
...
@@ -172,7 +172,9 @@ class RAGTemplateForm(BaseModel):
@
app
.
post
(
"/template/update"
)
async
def
update_rag_template
(
form_data
:
RAGTemplateForm
,
user
=
Depends
(
get_admin_user
)):
# TODO: check template requirements
app
.
state
.
RAG_TEMPLATE
=
form_data
.
template
app
.
state
.
RAG_TEMPLATE
=
(
form_data
.
template
if
form_data
.
template
!=
""
else
RAG_TEMPLATE
)
return
{
"status"
:
True
,
"template"
:
app
.
state
.
RAG_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