mirror of
https://github.com/open-webui/open-webui
synced 2024-11-26 22:09:51 +00:00
fix: temperature not passed correctly
This commit is contained in:
parent
54420f5300
commit
97b39115a1
@ -764,7 +764,7 @@ async def generate_chat_completion(
|
||||
"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(
|
||||
"temperature", None
|
||||
)
|
||||
|
@ -373,8 +373,8 @@ async def proxy(path: str, request: Request, user=Depends(get_verified_user)):
|
||||
model_info.params = model_info.params.model_dump()
|
||||
|
||||
if model_info.params:
|
||||
if model_info.params.get("temperature", None):
|
||||
payload["temperature"] = int(
|
||||
if model_info.params.get("temperature", None) is not None:
|
||||
payload["temperature"] = float(
|
||||
model_info.params.get("temperature")
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user