wechatgpt/handler/telegram/telegram.go
2023-02-24 17:57:08 +08:00

19 lines
270 B
Go

package telegram
import (
"strings"
"wechatbot/openai"
log "github.com/sirupsen/logrus"
)
func Handle(msg string) *string {
requestText := strings.TrimSpace(msg)
reply, err := openai.Completions(requestText)
if err != nil {
log.Error(err)
}
return reply
}