Commit 8917a3ea authored by cyhhao's avatar cyhhao
Browse files

fix(网关): 修复 golangci-lint

parent 0c011b88
...@@ -439,7 +439,7 @@ func toPascalCase(value string) string { ...@@ -439,7 +439,7 @@ func toPascalCase(value string) string {
} }
runes := []rune(lower) runes := []rune(lower)
runes[0] = unicode.ToUpper(runes[0]) runes[0] = unicode.ToUpper(runes[0])
builder.WriteString(string(runes)) _, _ = builder.WriteString(string(runes))
} }
return builder.String() return builder.String()
} }
...@@ -723,12 +723,8 @@ func normalizeClaudeOAuthRequestBody(body []byte, modelID string, opts claudeOAu ...@@ -723,12 +723,8 @@ func normalizeClaudeOAuthRequestBody(body []byte, modelID string, opts claudeOAu
} }
} }
if _, ok := req["temperature"]; ok { delete(req, "temperature")
delete(req, "temperature") delete(req, "tool_choice")
}
if _, ok := req["tool_choice"]; ok {
delete(req, "tool_choice")
}
newBody, err := json.Marshal(req) newBody, err := json.Marshal(req)
if err != nil { if err != nil {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment