fix: preserve explicit zero values in native relay requests

This commit is contained in:
Seefs
2026-03-01 15:47:03 +08:00
parent e22f59e449
commit 2cf3c1836c
52 changed files with 523 additions and 232 deletions

View File

@@ -17,6 +17,7 @@ import (
"github.com/QuantumNous/new-api/types"
"github.com/gin-gonic/gin"
"github.com/samber/lo"
)
type Adaptor struct {
@@ -37,7 +38,7 @@ func (a *Adaptor) ConvertAudioRequest(c *gin.Context, info *relaycommon.RelayInf
}
voiceID := request.Voice
speed := request.Speed
speed := lo.FromPtrOr(request.Speed, 0.0)
outputFormat := request.ResponseFormat
minimaxRequest := MiniMaxTTSRequest{