fix: temperature not passed correctly

This commit is contained in:
Christoph Holthaus 2024-06-09 09:45:36 +02:00
parent 54420f5300
commit 97b39115a1
2 changed files with 3 additions and 3 deletions

View File

@ -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
)

View File

@ -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")
)