1
0
This repository has been archived on 2024-02-27. You can view files and clone it, but cannot push or open issues or pull requests.
chatgpt-to-api/internal/bard/request.go
2023-06-13 00:47:24 +08:00

22 lines
262 B
Go

package bard
import "time"
type BardCache struct {
Bards map[string]*Bard
}
var cache *BardCache
func init() {
cache = &BardCache{
Bards: make(map[string]*Bard),
}
go func() {
for {
GarbageCollectCache(cache)
time.Sleep(time.Minute)
}
}()
}