Procházet zdrojové kódy

chore: update variable name

JustSong před 2 roky
rodič
revize
3da12e99d9
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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)
 			}
 		}