mirror of
https://github.com/linux-do/new-api.git
synced 2025-09-18 00:16:37 +08:00
fix: fix gemini channel test
This commit is contained in:
parent
26ef906c61
commit
8fe8340b6e
@ -140,8 +140,8 @@ func responseGeminiChat2OpenAI(response *GeminiChatResponse) *dto.OpenAITextResp
|
|||||||
},
|
},
|
||||||
FinishReason: relaycommon.StopFinishReason,
|
FinishReason: relaycommon.StopFinishReason,
|
||||||
}
|
}
|
||||||
content, _ = json.Marshal(candidate.Content.Parts[0].Text)
|
|
||||||
if len(candidate.Content.Parts) > 0 {
|
if len(candidate.Content.Parts) > 0 {
|
||||||
|
content, _ = json.Marshal(candidate.Content.Parts[0].Text)
|
||||||
choice.Message.Content = content
|
choice.Message.Content = content
|
||||||
}
|
}
|
||||||
fullTextResponse.Choices = append(fullTextResponse.Choices, choice)
|
fullTextResponse.Choices = append(fullTextResponse.Choices, choice)
|
||||||
|
Loading…
Reference in New Issue
Block a user