feat: integrate the AI assistant.

This commit is contained in:
Yiyang Kang 2023-03-20 18:12:41 +08:00
parent 522d253410
commit dcb251d2ad
Signed by: kkyy
GPG key ID: 80FD317ECAF06CC3
7 changed files with 366 additions and 7 deletions

9
bot.go
View file

@ -55,8 +55,6 @@ func initBot() (*tele.Bot, error) {
adminGrp.Handle("/dig", handleDigCmd)
// adminGrp.Handle("/test", testCmd)
return b, nil
}
@ -104,8 +102,11 @@ func drawBar(progress float64, length int) string {
return string(buf)
}
func handleGeneralMessage(_ tele.Context) error {
// Do nothing for now
func handleGeneralMessage(c tele.Context) error {
if thread := matchAssistantConversation(c.Bot().Me, c.Message()); thread != nil {
return handleAssistantConversation(c, thread)
}
return nil
}