refactor: Improve channel status update logic and clean up code

- Simplified conditional checks in UpdateChannelStatusById function in channel.go to enhance readability.
- Commented out unused image number check in relay-gemini.go for clarity.
- Updated JSON field in en.json for currency consistency, changing "元" from "RMB/CNY" to "CNY" and added a space in "实付金额:" for formatting.
This commit is contained in:
CalciumIon
2024-12-17 15:33:16 +08:00
parent 70e7860838
commit 2d865eb735
3 changed files with 14 additions and 13 deletions

View File

@@ -103,9 +103,9 @@ func CovertGemini2OpenAI(textRequest dto.GeneralOpenAIRequest) *GeminiChatReques
})
} else if part.Type == dto.ContentTypeImageURL {
imageNum += 1
if imageNum > GeminiVisionMaxImageNum {
continue
}
//if imageNum > GeminiVisionMaxImageNum {
// continue
//}
// 判断是否是url
if strings.HasPrefix(part.ImageUrl.(dto.MessageImageUrl).Url, "http") {
// 是url获取图片的类型和base64编码的数据