From e2b10f9d77cabdf066672cd812b12d68685e6294 Mon Sep 17 00:00:00 2001 From: Zhang Minghan Date: Sun, 18 Feb 2024 21:25:45 +0800 Subject: [PATCH] feat: hide role field on empty --- manager/types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manager/types.go b/manager/types.go index 09aa27a..815c2fc 100644 --- a/manager/types.go +++ b/manager/types.go @@ -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