fix(translator): avoid forcing RFC 8259 system prompt

This commit is contained in:
hkfires
2026-01-19 11:33:27 +08:00
parent cf9daf470c
commit 52e46ced1b

View File

@@ -88,7 +88,7 @@ func ConvertClaudeRequestToOpenAI(modelName string, inputRawJSON []byte, stream
var messagesJSON = "[]"
// Handle system message first
systemMsgJSON := `{"role":"system","content":[{"type":"text","text":"Use ANY tool, the parameters MUST accord with RFC 8259 (The JavaScript Object Notation (JSON) Data Interchange Format), the keys and value MUST be enclosed in double quotes."}]}`
systemMsgJSON := `{"role":"system","content":[]}`
if system := root.Get("system"); system.Exists() {
if system.Type == gjson.String {
if system.String() != "" {