Skip to content

Commit

Permalink
Merge pull request #2213 from MahtabBukhari/Fix_500_error_in_hivechat…
Browse files Browse the repository at this point in the history
…_response_endpoint

[Bug] Fix 500 error in /hivechat/response endpoint - Primary key conflict in message creation
  • Loading branch information
humansinstitute authored Dec 17, 2024
2 parents e5fcf13 + c8b9bf9 commit 5abd8f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion handlers/chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 5abd8f6

Please sign in to comment.