mirror of
https://github.com/open-webui/open-webui.git
synced 2025-04-12 05:49:05 +02:00
Merge pull request #10617 from grandtele/fix/openai-o1-o3-role
fix: replace "system" with "developer" for o1 and o3 models
This commit is contained in:
commit
0ba45ad82b
@ -84,9 +84,9 @@ def openai_o1_o3_handler(payload):
|
||||
payload["max_completion_tokens"] = payload["max_tokens"]
|
||||
del payload["max_tokens"]
|
||||
|
||||
# Fix: O1 does not support the "system" parameter, Modify "system" to "user"
|
||||
# Fix: o1 and o3 do not support the "system" parameter. Modify "system" to "developer"
|
||||
if payload["messages"][0]["role"] == "system":
|
||||
payload["messages"][0]["role"] = "user"
|
||||
payload["messages"][0]["role"] = "developer"
|
||||
|
||||
return payload
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user