mirror of
https://github.com/open-webui/open-webui
synced 2025-02-23 13:51:07 +00:00
fix : o1 should also be applied
This commit is contained in:
parent
80e123f58f
commit
b9480c0e8a
@ -622,7 +622,7 @@ async def generate_chat_completion(
|
||||
key = request.app.state.config.OPENAI_API_KEYS[idx]
|
||||
|
||||
# Fix: o1,o3 does not support the "max_tokens" parameter, Modify "max_tokens" to "max_completion_tokens"
|
||||
is_o1_o3 = payload["model"].lower().startswith(("o1-", "o3-"))
|
||||
is_o1_o3 = payload["model"].lower().startswith(("o1", "o3-"))
|
||||
if is_o1_o3:
|
||||
payload = openai_o1_o3_handler(payload)
|
||||
elif "api.openai.com" not in url:
|
||||
|
Loading…
Reference in New Issue
Block a user