Просмотр исходного кода

feat: remove custom JSON marshaling for Message struct

CaIon 7 месяцев назад
Родитель
Сommit
50f9195f2d
1 измененных файлов с 0 добавлено и 8 удалено
  1. 0 8
      dto/openai_request.go

+ 0 - 8
dto/openai_request.go

@@ -140,14 +140,6 @@ type Message struct {
 	//parsedStringContent *string
 }
 
-func (m *Message) MarshalJSON() ([]byte, error) {
-	if m.Content == nil {
-		m.Content = ""
-	}
-	type Alias Message
-	return json.Marshal((*Alias)(m))
-}
-
 type MediaContent struct {
 	Type       string `json:"type"`
 	Text       string `json:"text,omitempty"`