@@ -93,7 +93,7 @@ type ChatMessagePart struct {
93
93
94
94
type ChatCompletionMessage struct {
95
95
Role string `json:"role"`
96
- Content string `json:"content"`
96
+ Content string `json:"content,omitempty "`
97
97
Refusal string `json:"refusal,omitempty"`
98
98
MultiContent []ChatMessagePart
99
99
@@ -132,7 +132,7 @@ func (m ChatCompletionMessage) MarshalJSON() ([]byte, error) {
132
132
133
133
msg := struct {
134
134
Role string `json:"role"`
135
- Content string `json:"content"`
135
+ Content string `json:"content,omitempty "`
136
136
Refusal string `json:"refusal,omitempty"`
137
137
MultiContent []ChatMessagePart `json:"-"`
138
138
Name string `json:"name,omitempty"`
@@ -146,7 +146,7 @@ func (m ChatCompletionMessage) MarshalJSON() ([]byte, error) {
146
146
func (m * ChatCompletionMessage ) UnmarshalJSON (bs []byte ) error {
147
147
msg := struct {
148
148
Role string `json:"role"`
149
- Content string `json:"content"`
149
+ Content string `json:"content,omitempty "`
150
150
Refusal string `json:"refusal,omitempty"`
151
151
MultiContent []ChatMessagePart
152
152
Name string `json:"name,omitempty"`
0 commit comments