aboutsummaryrefslogtreecommitdiff
path: root/cmd/mimi/modules
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2024-07-27 12:19:33 -0400
committerXe Iaso <me@xeiaso.net>2024-07-27 12:19:33 -0400
commit45b48a01178e8501ca9b534f8e02a3192a1d2d7d (patch)
treeddf820ea10ef499397fd7f0d6703e8ddae3ea38f /cmd/mimi/modules
parent4920f83392c0af6896b43e6e30af9b2666f9217c (diff)
downloadx-45b48a01178e8501ca9b534f8e02a3192a1d2d7d.tar.xz
x-45b48a01178e8501ca9b534f8e02a3192a1d2d7d.zip
idiocy
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'cmd/mimi/modules')
-rw-r--r--cmd/mimi/modules/discord/jufra/jufra.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/mimi/modules/discord/jufra/jufra.go b/cmd/mimi/modules/discord/jufra/jufra.go
index 7604ed5..a5bef0a 100644
--- a/cmd/mimi/modules/discord/jufra/jufra.go
+++ b/cmd/mimi/modules/discord/jufra/jufra.go
@@ -90,7 +90,7 @@ func (m *Module) messageCreate(s *discordgo.Session, mc *discordgo.MessageCreate
m.lock.Lock()
defer m.lock.Unlock()
- conv := m.convHistory[mc.Author.ID]
+ conv := m.convHistory[mc.ChannelID]
conv = append(conv, ollama.Message{
Role: "user",
@@ -154,7 +154,7 @@ func (m *Module) messageCreate(s *discordgo.Session, mc *discordgo.MessageCreate
s.ChannelMessageSend(mc.ChannelID, resp.Message.Content)
- m.convHistory[mc.Author.ID] = conv
+ m.convHistory[mc.ChannelID] = conv
}
func (m *Module) llamaGuardCheck(ctx context.Context, role string, messages []ollama.Message) (*llamaguard.Response, error) {