mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-15 08:32:41 +00:00
Expand sentiment to 10 categories, add DB maintenance job, update README
- Expand LLM sentiment classification from 3 to 10 categories: positive, negative, neutral, excited, sarcastic, frustrated, curious, grateful, humorous, supportive — with emoji reactions for each - Add daily DB maintenance job at 03:00 UTC to purge stale caches, expired rate limits, old logs, and run SQLite optimize - Add migrate.sql for upgrading existing databases - Update README: add !sentiment command, maintenance job, rate limit config, in-memory message buffer docs, SDK migration history, remove references to previous private repo Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -120,11 +120,13 @@ func (p *HowAmIPlugin) gatherProfile(userID id.UserID) string {
|
||||
sb.WriteString(fmt.Sprintf("Achievements unlocked: %d\n", achievementCount))
|
||||
|
||||
// Sentiment stats
|
||||
var positive, negative, neutral int
|
||||
var positive, negative, neutral, excited, sarcastic, frustrated, curious, grateful, humorous, supportive int
|
||||
if err := d.QueryRow(
|
||||
`SELECT positive, negative, neutral FROM sentiment_stats WHERE user_id = ?`, uid,
|
||||
).Scan(&positive, &negative, &neutral); err == nil {
|
||||
sb.WriteString(fmt.Sprintf("Sentiment: %d positive, %d negative, %d neutral\n", positive, negative, neutral))
|
||||
`SELECT positive, negative, neutral, excited, sarcastic, frustrated, curious, grateful, humorous, supportive
|
||||
FROM sentiment_stats WHERE user_id = ?`, uid,
|
||||
).Scan(&positive, &negative, &neutral, &excited, &sarcastic, &frustrated, &curious, &grateful, &humorous, &supportive); err == nil {
|
||||
sb.WriteString(fmt.Sprintf("Sentiment: %d positive, %d excited, %d supportive, %d grateful, %d humorous, %d curious, %d neutral, %d sarcastic, %d frustrated, %d negative\n",
|
||||
positive, excited, supportive, grateful, humorous, curious, neutral, sarcastic, frustrated, negative))
|
||||
}
|
||||
|
||||
// Profanity count
|
||||
|
||||
Reference in New Issue
Block a user