From c1e95374f2505606bd1030386f7871764866fb5f Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 19 Dec 2024 16:52:43 +0800 Subject: [PATCH] Update GenerateChatTitle method to include silent mode in chat handling - Modified the handleChatUpdate function to pass an additional parameter for silent mode when generating chat titles, enhancing the flexibility of chat title generation. - This change allows for improved handling of chat updates, ensuring that the API can better manage user expectations and interactions. --- neo/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neo/api.go b/neo/api.go index b680a711..e17aa8f9 100644 --- a/neo/api.go +++ b/neo/api.go @@ -452,7 +452,7 @@ func (neo *DSL) handleChatUpdate(c *gin.Context) { ctx, cancel := NewContextWithCancel(sid, c.Query("chat_id"), "") defer cancel() - title, err := neo.GenerateChatTitle(ctx, body.Content, c) + title, err := neo.GenerateChatTitle(ctx, body.Content, c, true) if err != nil { c.JSON(500, gin.H{"message": err.Error(), "code": 500}) c.Done()