mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-12-26 18:15:57 +08:00
定期清理用户聊天会话上下文 ChatContext
This commit is contained in:
@@ -48,6 +48,12 @@ type ChatSession struct {
|
||||
Username string `json:"user"` // 当前登录的 user
|
||||
}
|
||||
|
||||
// ChatContext 聊天上下文
|
||||
type ChatContext struct {
|
||||
Messages []Message
|
||||
LastAccessTime int64 // 最后一次访问上下文时间
|
||||
}
|
||||
|
||||
func GetDefaultChatRole() map[string]ChatRole {
|
||||
return map[string]ChatRole{
|
||||
"gpt": {
|
||||
|
||||
Reference in New Issue
Block a user