"git@web.lueluesay.top:chenxi/sub2api.git" did not exist on "4f7629a4cbc84d88c66d5b34e6f9a34db2b67c4d"
Unverified Commit 9ee7d393 authored by 时雨遥's avatar 时雨遥 Committed by GitHub
Browse files

Update backend/internal/service/gateway_request.go


Co-authored-by: default avatarCopilot <175728472+Copilot@users.noreply.github.com>
parent 1071fe0a
...@@ -507,11 +507,15 @@ func FilterSignatureSensitiveBlocksForRetry(body []byte) []byte { ...@@ -507,11 +507,15 @@ func FilterSignatureSensitiveBlocksForRetry(body []byte) []byte {
filtered = append(filtered, edit) filtered = append(filtered, edit)
} }
if len(filtered) != len(edits) { if len(filtered) != len(edits) {
if len(filtered) == 0 {
delete(cm, "edits")
} else {
cm["edits"] = filtered cm["edits"] = filtered
} }
} }
} }
} }
}
messages, ok := req["messages"].([]any) messages, ok := req["messages"].([]any)
if !ok { if !ok {
......
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