From e3285923e601ecfecc9cb8e717ef744d8c71d622 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 21 Jan 2025 15:11:09 +0800 Subject: [PATCH] Update Message struct to improve JSON serialization - Renamed the 'is_new' field to 'new' in the Message struct for better clarity and consistency in JSON output. - This change enhances the maintainability of the Neo API assistant by streamlining the message structure and improving data representation. --- neo/message/message.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neo/message/message.go b/neo/message/message.go index 815d5ea3..e632a4b3 100644 --- a/neo/message/message.go +++ b/neo/message/message.go @@ -20,7 +20,7 @@ type Message struct { Type string `json:"type,omitempty"` // error, text, plan, table, form, page, file, video, audio, image, markdown, json ... Props map[string]interface{} `json:"props,omitempty"` // props for the types IsDone bool `json:"done,omitempty"` // Mark as a done message from neo - IsNew bool `json:"is_new,omitempty"` // Mark as a new message from neo + IsNew bool `json:"new,omitempty"` // Mark as a new message from neo Actions []Action `json:"actions,omitempty"` // Conversation Actions for frontend Attachments []Attachment `json:"attachments,omitempty"` // File attachments Role string `json:"role,omitempty"` // user, assistant, system ...