Skip to content

Commit

Permalink
fix: fix gemini channel test
Browse files Browse the repository at this point in the history
  • Loading branch information
Calcium-Ion committed Mar 8, 2024
1 parent 26ef906 commit 8fe8340
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion relay/channel/gemini/relay-gemini.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ func responseGeminiChat2OpenAI(response *GeminiChatResponse) *dto.OpenAITextResp
},
FinishReason: relaycommon.StopFinishReason,
}
content, _ = json.Marshal(candidate.Content.Parts[0].Text)
if len(candidate.Content.Parts) > 0 {
content, _ = json.Marshal(candidate.Content.Parts[0].Text)
choice.Message.Content = content
}
fullTextResponse.Choices = append(fullTextResponse.Choices, choice)
Expand Down

0 comments on commit 8fe8340

Please sign in to comment.