summaryrefslogtreecommitdiff
path: root/llm.go
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2026-03-09 07:07:36 +0300
committerGrail Finder <wohilas@gmail.com>2026-03-09 07:07:36 +0300
commit0e42a6f069ceea40485162c014c04cf718568cfe (patch)
tree583a6a6cb91b315e506990a03fdda1b32d0fe985 /llm.go
parent2687f38d00ceaa4f61034e3e02b9b59d08efc017 (diff)
parenta1b5f9cdc59938901123650fc0900067ac3447ca (diff)
Merge branch 'master' into feat/agent-flow
Diffstat (limited to 'llm.go')
-rw-r--r--llm.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/llm.go b/llm.go
index eaa0df8..0e77bc9 100644
--- a/llm.go
+++ b/llm.go
@@ -62,11 +62,11 @@ type ChunkParser interface {
func choseChunkParser() {
chunkParser = LCPCompletion{}
switch cfg.CurrentAPI {
- case "http://localhost:8080/completion":
+ case "http://localhost:8080/completion", "http://127.0.0.1:8080/completion":
chunkParser = LCPCompletion{}
logger.Debug("chosen lcpcompletion", "link", cfg.CurrentAPI)
return
- case "http://localhost:8080/v1/chat/completions":
+ case "http://localhost:8080/v1/chat/completions", "http://127.0.0.1:8080/v1/chat/completions":
chunkParser = LCPChat{}
logger.Debug("chosen lcpchat", "link", cfg.CurrentAPI)
return
@@ -87,6 +87,11 @@ func choseChunkParser() {
logger.Debug("chosen openrouterchat", "link", cfg.CurrentAPI)
return
default:
+ logger.Warn("unexpected case, assuming llama.cpp on non default address", "link", cfg.CurrentAPI)
+ if strings.Contains(cfg.CurrentAPI, "chat") {
+ chunkParser = LCPChat{}
+ return
+ }
chunkParser = LCPCompletion{}
}
}