@@ -93,7 +93,7 @@ type ChatMessagePart struct {
9393
9494type ChatCompletionMessage struct {
9595 Role string `json:"role"`
96- Content string `json:"content"`
96+ Content string `json:"content,omitempty "`
9797 Refusal string `json:"refusal,omitempty"`
9898 MultiContent []ChatMessagePart
9999
@@ -132,7 +132,7 @@ func (m ChatCompletionMessage) MarshalJSON() ([]byte, error) {
132132
133133 msg := struct {
134134 Role string `json:"role"`
135- Content string `json:"content"`
135+ Content string `json:"content,omitempty "`
136136 Refusal string `json:"refusal,omitempty"`
137137 MultiContent []ChatMessagePart `json:"-"`
138138 Name string `json:"name,omitempty"`
@@ -146,7 +146,7 @@ func (m ChatCompletionMessage) MarshalJSON() ([]byte, error) {
146146func (m * ChatCompletionMessage ) UnmarshalJSON (bs []byte ) error {
147147 msg := struct {
148148 Role string `json:"role"`
149- Content string `json:"content"`
149+ Content string `json:"content,omitempty "`
150150 Refusal string `json:"refusal,omitempty"`
151151 MultiContent []ChatMessagePart
152152 Name string `json:"name,omitempty"`
0 commit comments