From 58a645e60b5f4b434265ee76ad6a573203c1f7ad Mon Sep 17 00:00:00 2001 From: MahtabBukhari Date: Tue, 17 Dec 2024 18:01:06 +0300 Subject: [PATCH 1/3] fix 500 error in hivechat response endpoint --- handlers/chat.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handlers/chat.go b/handlers/chat.go index b15d5c0d7..efd46c67f 100644 --- a/handlers/chat.go +++ b/handlers/chat.go @@ -344,7 +344,7 @@ func (ch *ChatHandler) ProcessChatResponse(w http.ResponseWriter, r *http.Reques } message := &db.ChatMessage{ - ID: request.MessageID, + ID: xid.New().String(), ChatID: request.ChatID, Message: request.Response, Role: "assistant", From fa42b40c5be95fa1c68a02f008cc45287a6d8bde Mon Sep 17 00:00:00 2001 From: MahtabBukhari Date: Tue, 17 Dec 2024 18:22:06 +0300 Subject: [PATCH 2/3] fix 500 error in hivechat response endpoint1 --- handlers/chat.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handlers/chat.go b/handlers/chat.go index efd46c67f..b15d5c0d7 100644 --- a/handlers/chat.go +++ b/handlers/chat.go @@ -344,7 +344,7 @@ func (ch *ChatHandler) ProcessChatResponse(w http.ResponseWriter, r *http.Reques } message := &db.ChatMessage{ - ID: xid.New().String(), + ID: request.MessageID, ChatID: request.ChatID, Message: request.Response, Role: "assistant", From c8b9bf9f753b5a1dce76094763deab1d6556cc40 Mon Sep 17 00:00:00 2001 From: MahtabBukhari Date: Tue, 17 Dec 2024 18:22:46 +0300 Subject: [PATCH 3/3] fix 500 error in hivechat response endpoint --- handlers/chat.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handlers/chat.go b/handlers/chat.go index b15d5c0d7..efd46c67f 100644 --- a/handlers/chat.go +++ b/handlers/chat.go @@ -344,7 +344,7 @@ func (ch *ChatHandler) ProcessChatResponse(w http.ResponseWriter, r *http.Reques } message := &db.ChatMessage{ - ID: request.MessageID, + ID: xid.New().String(), ChatID: request.ChatID, Message: request.Response, Role: "assistant",