Feat: bot to write for any char in chat (completion only)

This commit is contained in:
Grail Finder
2025-08-20 22:45:41 +03:00
parent 6955a5bc3a
commit eee5e83d32
6 changed files with 96 additions and 36 deletions

5
bot.go
View File

@@ -203,7 +203,7 @@ func sendMsgToLLM(body io.Reader) {
line, err := reader.ReadBytes('\n')
if err != nil {
logger.Error("error reading response body", "error", err, "line", string(line),
"reqbody", string(bodyBytes), "user_role", cfg.UserRole, "parser", chunkParser, "link", cfg.CurrentAPI)
"user_role", cfg.UserRole, "parser", chunkParser, "link", cfg.CurrentAPI)
// if err.Error() != "EOF" {
streamDone <- true
break
@@ -355,6 +355,9 @@ func chatRound(userMsg, role string, tv *tview.TextView, regen, resume bool) {
logger.Error("empty reader from msgs", "role", role, "error", err)
return
}
if cfg.SkipLLMResp {
return
}
go sendMsgToLLM(reader)
logger.Debug("looking at vars in chatRound", "msg", userMsg, "regen", regen, "resume", resume)
if !resume {