Feat: guess limit

This commit is contained in:
Grail Finder
2025-06-14 11:37:42 +03:00
parent bddaa912de
commit fa25679624
8 changed files with 97 additions and 64 deletions

View File

@ -112,18 +112,19 @@ func loadState(username string) (*models.UserState, error) {
return resp, nil
}
func loadBot(botName, roomID string) (*llmapi.Bot, error) {
key := "botkey_" + roomID + botName
data, err := memcache.Get(key)
if err != nil {
return nil, err
}
resp := &llmapi.Bot{}
if err := json.Unmarshal(data, &resp); err != nil {
return nil, err
}
return resp, nil
}
// not used
// func loadBot(botName, roomID string) (*llmapi.Bot, error) {
// key := "botkey_" + roomID + botName
// data, err := memcache.Get(key)
// if err != nil {
// return nil, err
// }
// resp := &llmapi.Bot{}
// if err := json.Unmarshal(data, &resp); err != nil {
// return nil, err
// }
// return resp, nil
// }
func getAllNames() []string {
names := []string{}