Skip to content

Commit

Permalink
feat: all clear context
Browse files Browse the repository at this point in the history
  • Loading branch information
Leizhenpeng committed Feb 10, 2023
1 parent 7769ea3 commit 55d628c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion code/handlers/personal.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ func (p PersonalMessageHandler) handle(ctx context.Context, event *larkim.P2Mess
p.msgCache.TagProcessed(*msgId)
qParsed := parseContent(*content)
if len(qParsed) == 0 {
sendMsg(ctx, "🤖️:你想知道什么呢~", chatId)

fmt.Println("msgId", *msgId, "message.text is empty")
return nil
}

if qParsed == "/clear" || qParsed == "记忆清除" {
if qParsed == "/clear" || qParsed == "清除" {
p.userCache.Clear(*openId)
sendMsg(ctx, "🤖️:AI机器人已清除记忆", chatId)
return nil
Expand Down

0 comments on commit 55d628c

Please sign in to comment.