neotf hace 8 meses
padre
commit
37fbcb7950
Se han modificado 1 ficheros con 5 adiciones y 5 borrados
  1. 5 5
      relay/channel/openai/adaptor.go

+ 5 - 5
relay/channel/openai/adaptor.go

@@ -159,11 +159,11 @@ func (a *Adaptor) ConvertOpenAIRequest(c *gin.Context, info *relaycommon.RelayIn
 	if info.ChannelType != common.ChannelTypeOpenAI && info.ChannelType != common.ChannelTypeAzure {
 		request.StreamOptions = nil
 	}
-if info.ChannelType == common.ChannelTypeOpenRouter {
-    if len(request.Usage) == 0 {
-        request.Usage = json.RawMessage(`{"include":true}`)
-    }
-}
+	if info.ChannelType == common.ChannelTypeOpenRouter {
+		if len(request.Usage) == 0 {
+			request.Usage = json.RawMessage(`{"include":true}`)
+		}
+	}
 	if strings.HasPrefix(request.Model, "o") {
 		if request.MaxCompletionTokens == 0 && request.MaxTokens != 0 {
 			request.MaxCompletionTokens = request.MaxTokens