mirror of
https://github.com/open-webui/open-webui
synced 2025-03-04 19:38:54 +00:00
* fix: adjust role mapping for o1 and o3 models in openai_o1_o3_handler
This commit is contained in:
parent
6fedd72e39
commit
82657acdce
@ -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…
Reference in New Issue
Block a user