From 45b48a01178e8501ca9b534f8e02a3192a1d2d7d Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Sat, 27 Jul 2024 12:19:33 -0400 Subject: idiocy Signed-off-by: Xe Iaso --- cmd/mimi/modules/discord/jufra/jufra.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmd/mimi/modules') 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) { -- cgit v1.2.3