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
015772ef
Commit
015772ef
authored
Jun 20, 2024
by
Timothy J. Baek
Browse files
refac
parent
e20baad6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
backend/apps/openai/main.py
backend/apps/openai/main.py
+6
-1
No files found.
backend/apps/openai/main.py
View file @
015772ef
...
@@ -432,7 +432,12 @@ async def generate_chat_completion(
...
@@ -432,7 +432,12 @@ async def generate_chat_completion(
idx
=
model
[
"urlIdx"
]
idx
=
model
[
"urlIdx"
]
if
"pipeline"
in
model
and
model
.
get
(
"pipeline"
):
if
"pipeline"
in
model
and
model
.
get
(
"pipeline"
):
payload
[
"user"
]
=
{
"name"
:
user
.
name
,
"id"
:
user
.
id
}
payload
[
"user"
]
=
{
"name"
:
user
.
name
,
"id"
:
user
.
id
,
"email"
:
user
.
email
,
"role"
:
user
.
role
,
}
# Check if the model is "gpt-4-vision-preview" and set "max_tokens" to 4000
# Check if the model is "gpt-4-vision-preview" and set "max_tokens" to 4000
# This is a workaround until OpenAI fixes the issue with this model
# This is a workaround until OpenAI fixes the issue with this model
...
...
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