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
81a3c970
Commit
81a3c970
authored
May 14, 2024
by
Jun Siang Cheah
Browse files
Merge branch 'dev' into feat/backend-web-search
parents
f9469038
2290eefc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
backend/apps/openai/main.py
backend/apps/openai/main.py
+1
-1
backend/main.py
backend/main.py
+1
-1
No files found.
backend/apps/openai/main.py
View file @
81a3c970
...
...
@@ -119,7 +119,7 @@ async def speech(request: Request, user=Depends(get_verified_user)):
headers
=
{}
headers
[
"Authorization"
]
=
f
"Bearer
{
app
.
state
.
config
.
OPENAI_API_KEYS
[
idx
]
}
"
headers
[
"Content-Type"
]
=
"application/json"
if
"openrouter.ai"
in
app
.
state
.
OPENAI_API_BASE_URLS
[
idx
]:
if
"openrouter.ai"
in
app
.
state
.
config
.
OPENAI_API_BASE_URLS
[
idx
]:
headers
[
"HTTP-Referer"
]
=
"https://openwebui.com/"
headers
[
"X-Title"
]
=
"Open WebUI"
r
=
None
...
...
backend/main.py
View file @
81a3c970
...
...
@@ -147,7 +147,7 @@ class RAGMiddleware(BaseHTTPMiddleware):
messages
=
data
[
"messages"
],
template
=
rag_app
.
state
.
config
.
RAG_TEMPLATE
,
embedding_function
=
rag_app
.
state
.
EMBEDDING_FUNCTION
,
k
=
rag_app
.
state
.
TOP_K
,
k
=
rag_app
.
state
.
config
.
TOP_K
,
reranking_function
=
rag_app
.
state
.
sentence_transformer_rf
,
r
=
rag_app
.
state
.
config
.
RELEVANCE_THRESHOLD
,
hybrid_search
=
rag_app
.
state
.
config
.
ENABLE_RAG_HYBRID_SEARCH
,
...
...
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