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
97b39115
Commit
97b39115
authored
Jun 09, 2024
by
Christoph Holthaus
Browse files
fix: temperature not passed correctly
parent
54420f53
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
backend/apps/ollama/main.py
backend/apps/ollama/main.py
+1
-1
backend/apps/openai/main.py
backend/apps/openai/main.py
+2
-2
No files found.
backend/apps/ollama/main.py
View file @
97b39115
...
@@ -764,7 +764,7 @@ async def generate_chat_completion(
...
@@ -764,7 +764,7 @@ async def generate_chat_completion(
"frequency_penalty"
,
None
"frequency_penalty"
,
None
)
)
if
model_info
.
params
.
get
(
"temperature"
,
None
):
if
model_info
.
params
.
get
(
"temperature"
,
None
)
is
not
None
:
payload
[
"options"
][
"temperature"
]
=
model_info
.
params
.
get
(
payload
[
"options"
][
"temperature"
]
=
model_info
.
params
.
get
(
"temperature"
,
None
"temperature"
,
None
)
)
...
...
backend/apps/openai/main.py
View file @
97b39115
...
@@ -373,8 +373,8 @@ async def proxy(path: str, request: Request, user=Depends(get_verified_user)):
...
@@ -373,8 +373,8 @@ async def proxy(path: str, request: Request, user=Depends(get_verified_user)):
model_info
.
params
=
model_info
.
params
.
model_dump
()
model_info
.
params
=
model_info
.
params
.
model_dump
()
if
model_info
.
params
:
if
model_info
.
params
:
if
model_info
.
params
.
get
(
"temperature"
,
None
):
if
model_info
.
params
.
get
(
"temperature"
,
None
)
is
not
None
:
payload
[
"temperature"
]
=
in
t
(
payload
[
"temperature"
]
=
floa
t
(
model_info
.
params
.
get
(
"temperature"
)
model_info
.
params
.
get
(
"temperature"
)
)
)
...
...
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