Enha: bot guesser

This commit is contained in:
Grail Finder
2025-05-29 11:46:40 +03:00
parent 9ebce0a7d0
commit 7fab000d20
4 changed files with 64 additions and 28 deletions

View File

@ -2,6 +2,7 @@ package handlers
import (
"errors"
"fmt"
"golias/llmapi"
"golias/models"
"html/template"
@ -147,7 +148,8 @@ func HandleAddBot(w http.ResponseWriter, r *http.Request) {
}
// TODO: what if bot exists already?
// control number and names of bots
bot, err := llmapi.NewBot(role, team, "bot1", fi.Room.ID, cfg)
botname := fmt.Sprintf("bot_%d", len(llmapi.SignalChanMap)+1) // what if many rooms?
bot, err := llmapi.NewBot(role, team, botname, fi.Room.ID, cfg)
if err != nil {
abortWithError(w, err.Error())
return