aboutsummaryrefslogtreecommitdiff
path: root/cmd/mimi/modules
diff options
context:
space:
mode:
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) {