feat(relay): add debug logging for Gemini request body and introduce flexible speech configuration

This commit is contained in:
CaIon
2025-06-18 20:50:13 +08:00
parent 0b9b21eafd
commit 7572e791f6
2 changed files with 5 additions and 0 deletions

View File

@@ -155,6 +155,10 @@ func GeminiHelper(c *gin.Context) (openaiErr *dto.OpenAIErrorWithStatusCode) {
return service.OpenAIErrorWrapperLocal(err, "marshal_text_request_failed", http.StatusInternalServerError)
}
if common.DebugEnabled {
println("Gemini request body: %s", string(requestBody))
}
resp, err := adaptor.DoRequest(c, relayInfo, bytes.NewReader(requestBody))
if err != nil {
common.LogError(c, "Do gemini request failed: "+err.Error())