refactor: message content 改成 any

refactor: message content 改成 any
This commit is contained in:
Xyfacai
2025-06-07 23:05:01 +08:00
parent a26dbf5358
commit b778cd2b23
16 changed files with 319 additions and 122 deletions

View File

@@ -609,14 +609,13 @@ func responseGeminiChat2OpenAI(response *GeminiChatResponse) *dto.OpenAITextResp
Created: common.GetTimestamp(),
Choices: make([]dto.OpenAITextResponseChoice, 0, len(response.Candidates)),
}
content, _ := json.Marshal("")
isToolCall := false
for _, candidate := range response.Candidates {
choice := dto.OpenAITextResponseChoice{
Index: int(candidate.Index),
Message: dto.Message{
Role: "assistant",
Content: content,
Content: "",
},
FinishReason: constant.FinishReasonStop,
}