mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 20:35:19 +00:00
refac
This commit is contained in:
parent
70de5cf7b8
commit
db9aef0eaf
1 changed files with 4 additions and 4 deletions
|
|
@ -604,10 +604,10 @@ async def generate_chat_completion(
|
||||||
if is_o1:
|
if is_o1:
|
||||||
payload = openai_o1_handler(payload)
|
payload = openai_o1_handler(payload)
|
||||||
elif "api.openai.com" not in url:
|
elif "api.openai.com" not in url:
|
||||||
# Remove "max_tokens" from the payload for backward compatibility
|
# Remove "max_completion_tokens" from the payload for backward compatibility
|
||||||
if "max_tokens" in payload:
|
if "max_completion_tokens" in payload:
|
||||||
payload["max_completion_tokens"] = payload["max_tokens"]
|
payload["max_tokens"] = payload["max_completion_tokens"]
|
||||||
del payload["max_tokens"]
|
del payload["max_completion_tokens"]
|
||||||
|
|
||||||
# TODO: check if below is needed
|
# TODO: check if below is needed
|
||||||
# if "max_tokens" in payload and "max_completion_tokens" in payload:
|
# if "max_tokens" in payload and "max_completion_tokens" in payload:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue