summaryrefslogtreecommitdiff
path: root/bot.go
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2025-02-01 16:32:36 +0300
committerGrail Finder <wohilas@gmail.com>2025-02-01 16:32:36 +0300
commit84c94ecea34753f246bdfd51f6ff989281e873e3 (patch)
tree3e4330ed00811cd46299968af69e6f3671316aa6 /bot.go
parent336451340b86ba1f713b47d44225df61058f5a8f (diff)
Feat: switch between completion and chat api
Diffstat (limited to 'bot.go')
-rw-r--r--bot.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot.go b/bot.go
index c256f58..e60c39f 100644
--- a/bot.go
+++ b/bot.go
@@ -91,7 +91,7 @@ func fetchModelName() {
// func sendMsgToLLM(body io.Reader) (*models.LLMRespChunk, error) {
func sendMsgToLLM(body io.Reader) {
// nolint
- resp, err := httpClient.Post(cfg.APIURL, "application/json", body)
+ resp, err := httpClient.Post(cfg.CurrentAPI, "application/json", body)
if err != nil {
logger.Error("llamacpp api", "error", err)
streamDone <- true
@@ -128,7 +128,7 @@ func sendMsgToLLM(body io.Reader) {
line = line[6:]
content, stop, err := chunkParser.ParseChunk(line)
if err != nil {
- logger.Error("error parsing response body", "error", err, "line", string(line), "url", cfg.APIURL)
+ logger.Error("error parsing response body", "error", err, "line", string(line), "url", cfg.CurrentAPI)
streamDone <- true
break
}