discord-gpt-bot/bot/memory.go
2025-04-23 00:04:00 +00:00

16 lines
302 B
Go

package memory
import (
"git.ewnix.net/phlux/discord-gpt-bot/openai"
)
var conversations = map[string][]openai.Message{}
func GetHistory(userID string) []openai.Message {
return conversations[userID]
}
func SetHistory(userID string, history []openai.Message) {
conversations[userID] = history
}