mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 13:00:52 +08:00
fix: filter whitespace-only text content in Claude to OpenAI translation
Remove redundant existence check since TrimSpace handles empty strings
This commit is contained in:
@@ -243,9 +243,6 @@ func convertClaudeContentPart(part gjson.Result) (string, bool) {
|
|||||||
|
|
||||||
switch partType {
|
switch partType {
|
||||||
case "text":
|
case "text":
|
||||||
if !part.Get("text").Exists() {
|
|
||||||
return "", false
|
|
||||||
}
|
|
||||||
text := part.Get("text").String()
|
text := part.Get("text").String()
|
||||||
if strings.TrimSpace(text) == "" {
|
if strings.TrimSpace(text) == "" {
|
||||||
return "", false
|
return "", false
|
||||||
|
|||||||
Reference in New Issue
Block a user