Skip to content

Commit

Permalink
bugfix:markdone v2 not use full
Browse files Browse the repository at this point in the history
  • Loading branch information
ivhu committed Dec 8, 2024
1 parent 6325892 commit 9ca1d1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions handler/gemini_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"chatbot/ai"
"chatbot/ai/gemini"
"chatbot/config"
"chatbot/utils"
"regexp"
"strings"
"sync"
Expand Down Expand Up @@ -173,7 +172,8 @@ func handlePrivateChat(b *gotgbot.Bot, ctx *ext.Context, ai ai.AiInterface) erro
}

func sendRespond(resp string, b *gotgbot.Bot, ctx *ext.Context) error {
resp = utils.EscapeMarkdownChars(resp)
resp = strings.ReplaceAll(resp, " **", "- **")
resp = strings.ReplaceAll(resp, "\n* ", "\n- ")
log.Debug().Msgf("gemini say in chat: %s", resp)
for i := 0; i < 3; i++ {
_, err := ctx.EffectiveMessage.Reply(b, resp, &gotgbot.SendMessageOpts{
Expand Down

0 comments on commit 9ca1d1e

Please sign in to comment.