fix: 修复流模式错误扣费的问题 (close #95)

This commit is contained in:
1808837298@qq.com
2024-03-06 17:41:55 +08:00
parent 9de2d21e1a
commit 626217fbd4
16 changed files with 166 additions and 35 deletions

View File

@@ -246,7 +246,7 @@ func geminiChatHandler(c *gin.Context, resp *http.Response, promptTokens int, mo
}
if len(geminiResponse.Candidates) == 0 {
return &dto.OpenAIErrorWithStatusCode{
OpenAIError: dto.OpenAIError{
Error: dto.OpenAIError{
Message: "No candidates returned",
Type: "server_error",
Param: "",