diff --git a/app/message.go b/app/message.go index cbb7027..b4d47aa 100644 --- a/app/message.go +++ b/app/message.go @@ -67,7 +67,7 @@ func getMessagesFromDB(c *gin.Context) { return } - parsed = strings.ReplaceAll(parsed, "
", "
")
+		parsed = strings.ReplaceAll(parsed, "
", "
")
 		parsed = strings.ReplaceAll(parsed, "
", "
") chatMessages = append(chatMessages, ChatMessage{ diff --git a/app/run.go b/app/run.go index 34c1f2c..528bce7 100644 --- a/app/run.go +++ b/app/run.go @@ -94,7 +94,7 @@ func (mc *ModelConfig) runModel(ctx context.Context) gin.HandlerFunc { for _, msg := range messages { parsedHuman, _ := parser.ParseMD(msg.Human) parsedResponse, _ := parser.ParseMD(msg.Response) - parsedResponse = strings.ReplaceAll(parsedResponse, "
", "
")
+			parsedResponse = strings.ReplaceAll(parsedResponse, "
", "
")
 			parsedResponse = strings.ReplaceAll(parsedResponse, "
", "
") chatMessages = append(chatMessages, ChatMessage{ Human: template.HTML(parsedHuman), diff --git a/templates/chat.html b/templates/chat.html index ffc366c..9e294aa 100644 --- a/templates/chat.html +++ b/templates/chat.html @@ -8,7 +8,7 @@
You
-
{{.Human}}
+
{{.Human}}
{{end}} {{if .Response}} @@ -19,7 +19,7 @@
JennAI
-
{{.Response}}
+
{{.Response}}
{{end}} diff --git a/templates/index.html b/templates/index.html index 79bbea1..99bebab 100644 --- a/templates/index.html +++ b/templates/index.html @@ -81,10 +81,10 @@ -
+
{{template "chat.html" .}}