feat: hide role field on empty

This commit is contained in:
Zhang Minghan 2024-02-18 21:25:45 +08:00
parent a26a072a0e
commit e2b10f9d77

View File

@ -7,7 +7,7 @@ import (
)
type Message struct {
Role string `json:"role"`
Role string `json:"role,omitempty"`
Content interface{} `json:"content"`
Name *string `json:"name,omitempty"`
FunctionCall *globals.FunctionCall `json:"function_call,omitempty"` // only `function` role