@@ -121,7 +121,7 @@ type ChatCompletionMessage struct {
121121 ToolCallID string `json:"tool_call_id,omitempty"`
122122
123123 // Messari custom fields
124- Prefix bool `json:"prefix"`
124+ Prefix bool `json:"prefix,omitempty "`
125125}
126126
127127func (m ChatCompletionMessage ) MarshalJSON () ([]byte , error ) {
@@ -139,6 +139,7 @@ func (m ChatCompletionMessage) MarshalJSON() ([]byte, error) {
139139 FunctionCall * FunctionCall `json:"function_call,omitempty"`
140140 ToolCalls []ToolCall `json:"tool_calls,omitempty"`
141141 ToolCallID string `json:"tool_call_id,omitempty"`
142+ Prefix bool `json:"prefix,omitempty"`
142143 }(m )
143144 return json .Marshal (msg )
144145 }
@@ -153,6 +154,7 @@ func (m ChatCompletionMessage) MarshalJSON() ([]byte, error) {
153154 FunctionCall * FunctionCall `json:"function_call,omitempty"`
154155 ToolCalls []ToolCall `json:"tool_calls,omitempty"`
155156 ToolCallID string `json:"tool_call_id,omitempty"`
157+ Prefix bool `json:"prefix,omitempty"`
156158 }(m )
157159 return json .Marshal (msg )
158160}
@@ -168,6 +170,7 @@ func (m *ChatCompletionMessage) UnmarshalJSON(bs []byte) error {
168170 FunctionCall * FunctionCall `json:"function_call,omitempty"`
169171 ToolCalls []ToolCall `json:"tool_calls,omitempty"`
170172 ToolCallID string `json:"tool_call_id,omitempty"`
173+ Prefix bool `json:"prefix,omitempty"`
171174 }{}
172175
173176 if err := json .Unmarshal (bs , & msg ); err == nil {
@@ -184,6 +187,7 @@ func (m *ChatCompletionMessage) UnmarshalJSON(bs []byte) error {
184187 FunctionCall * FunctionCall `json:"function_call,omitempty"`
185188 ToolCalls []ToolCall `json:"tool_calls,omitempty"`
186189 ToolCallID string `json:"tool_call_id,omitempty"`
190+ Prefix bool `json:"prefix,omitempty"`
187191 }{}
188192 if err := json .Unmarshal (bs , & multiMsg ); err != nil {
189193 return err
0 commit comments