Explorar o código

chore: update variable name

JustSong %!s(int64=2) %!d(string=hai) anos
pai
achega
3da12e99d9
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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)
 			}
 		}