Procházet zdrojové kódy

refactor(adaptor): Comment out enable_thinking logic for clarity and future adjustments

CaIon před 1 měsícem
rodič
revize
de93fa5f5f
1 změnil soubory, kde provedl 9 přidání a 9 odebrání
  1. 9 9
      relay/channel/ali/adaptor.go

+ 9 - 9
relay/channel/ali/adaptor.go

@@ -82,15 +82,15 @@ func (a *Adaptor) ConvertOpenAIRequest(c *gin.Context, info *relaycommon.RelayIn
 	}
 	// docs: https://bailian.console.aliyun.com/?tab=api#/api/?type=model&url=2712216
 	// fix: InternalError.Algo.InvalidParameter: The value of the enable_thinking parameter is restricted to True.
-	if strings.Contains(request.Model, "thinking") {
-		request.EnableThinking = true
-		request.Stream = true
-		info.IsStream = true
-	}
-	// fix: ali parameter.enable_thinking must be set to false for non-streaming calls
-	if !info.IsStream {
-		request.EnableThinking = false
-	}
+	//if strings.Contains(request.Model, "thinking") {
+	//	request.EnableThinking = true
+	//	request.Stream = true
+	//	info.IsStream = true
+	//}
+	//// fix: ali parameter.enable_thinking must be set to false for non-streaming calls
+	//if !info.IsStream {
+	//	request.EnableThinking = false
+	//}
 
 	switch info.RelayMode {
 	default: