Ver Fonte

chore: update variable name

JustSong há 2 anos atrás
pai
commit
3da12e99d9
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      controller/relay-baidu.go

+ 1 - 1
controller/relay-baidu.go

@@ -152,7 +152,7 @@ func embeddingRequestOpenAI2Baidu(request GeneralOpenAIRequest) *BaiduEmbeddingR
 		baiduEmbeddingRequest.Input = []string{request.Input.(string)}
 	case []any:
 		for _, item := range request.Input.([]any) {
-			if str, isStr := item.(string); isStr {
+			if str, ok := item.(string); ok {
 				baiduEmbeddingRequest.Input = append(baiduEmbeddingRequest.Input, str)
 			}
 		}