Optimize prompts

This commit is contained in:
HugeFrog24
2026-05-29 21:40:52 +02:00
parent a2cc252e8f
commit ab01fc31d8
9 changed files with 153 additions and 278 deletions
-6
View File
@@ -355,12 +355,6 @@ func contentBlocksForMessage(msg Message) []anthropic.BetaContentBlockParamUnion
return blocks
}
func (b *Bot) isNewChat(chatID int64) bool {
var count int64
b.db.Model(&Message{}).Where("chat_id = ? AND bot_id = ?", chatID, b.botID).Count(&count)
return count == 0 // Only consider a chat new if it has 0 messages
}
// roleHasScope reports whether role (with pre-loaded Scopes) contains the given scope name.
func roleHasScope(role Role, scope string) bool {
for _, s := range role.Scopes {