feat: 完善openai转claude支持

This commit is contained in:
CaIon
2025-04-11 18:28:50 +08:00
parent 75570af967
commit 4b3e30e669
6 changed files with 100 additions and 37 deletions

View File

@@ -214,6 +214,12 @@ func (m *Message) StringContent() string {
return stringContent
}
func (m *Message) SetNullContent() {
m.Content = nil
m.parsedStringContent = nil
m.parsedContent = nil
}
func (m *Message) SetStringContent(content string) {
jsonContent, _ := json.Marshal(content)
m.Content = jsonContent