nil pointer dereference fix (#37)
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
Alexey Skobkin 2024-11-04 01:41:08 +03:00
parent 541c1d3bbf
commit c3ee85bf35
Signed by: skobkin
GPG key ID: 4389E670595BF8A8

View file

@ -99,7 +99,7 @@ func chatMessageToOpenAiChatCompletionMessage(message ChatMessage) openai.ChatCo
func chatMessageToText(message ChatMessage) string {
var msgText string
if message.ReplyTo == nil {
if message.ReplyTo != nil {
msgText += "In reply to:"
msgText += quoteText(presentUserMessageAsText(*message.ReplyTo)) + "\n\n"
}