summaryrefslogtreecommitdiff
path: root/bot.go
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2025-12-18 14:39:06 +0300
committerGrail Finder <wohilas@gmail.com>2025-12-18 14:39:06 +0300
commit8cdec5e54455c3dfb74c2e8016f17f806f86fa54 (patch)
tree350b3ba67110de1a32b8d85528fd56298a2a32ab /bot.go
parenta06cfd995f05782854844e51a71a656f70274f64 (diff)
Feat: http request for agent
Diffstat (limited to 'bot.go')
-rw-r--r--bot.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/bot.go b/bot.go
index ddc6d2a..d6418ff 100644
--- a/bot.go
+++ b/bot.go
@@ -327,12 +327,11 @@ func fetchLCPModels() ([]string, error) {
return localModels, nil
}
+// sendMsgToLLM expects streaming resp
func sendMsgToLLM(body io.Reader) {
choseChunkParser()
-
var req *http.Request
var err error
-
// Capture and log the request body for debugging
if _, ok := body.(*io.LimitedReader); ok {
// If it's a LimitedReader, we need to handle it differently
@@ -379,7 +378,6 @@ func sendMsgToLLM(body io.Reader) {
return
}
}
-
req.Header.Add("Accept", "application/json")
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Bearer "+chunkParser.GetToken())