Merge pull request #1174 from QuantumNous/refactor/message

refactor: message content 改成 any
This commit is contained in:
Calcium-Ion
2025-06-08 16:22:20 +08:00
committed by GitHub
16 changed files with 319 additions and 122 deletions

View File

@@ -96,12 +96,11 @@ func embeddingResponseAli2OpenAI(response *AliEmbeddingResponse, model string) *
}
func responseAli2OpenAI(response *AliResponse) *dto.OpenAITextResponse {
content, _ := json.Marshal(response.Output.Text)
choice := dto.OpenAITextResponseChoice{
Index: 0,
Message: dto.Message{
Role: "assistant",
Content: content,
Content: response.Output.Text,
},
FinishReason: response.Output.FinishReason,
}