16 lines
302 B
Go
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
|
|
}
|