summaryrefslogtreecommitdiff
path: root/helpfuncs.go
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2026-03-07 18:42:12 +0300
committerGrail Finder <wohilas@gmail.com>2026-03-07 18:42:12 +0300
commitbf655a10875630a6fe5f283340b6d390a1920b58 (patch)
tree56b363f3638bbe0183bab60423f78843200b8951 /helpfuncs.go
parentc8f00198d6f0ad66269753252f56485ee346d413 (diff)
Enha: llama.cpp on non localhost
Diffstat (limited to 'helpfuncs.go')
-rw-r--r--helpfuncs.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/helpfuncs.go b/helpfuncs.go
index b94e672..370f4de 100644
--- a/helpfuncs.go
+++ b/helpfuncs.go
@@ -5,7 +5,6 @@ import (
"gf-lt/models"
"gf-lt/pngmeta"
"image"
- "net/url"
"os"
"os/exec"
"path"
@@ -323,12 +322,10 @@ func strInSlice(s string, sl []string) bool {
// isLocalLlamacpp checks if the current API is a local llama.cpp instance.
func isLocalLlamacpp() bool {
- u, err := url.Parse(cfg.CurrentAPI)
- if err != nil {
+ if strings.Contains(cfg.CurrentAPI, "openrouter") || strings.Contains(cfg.CurrentAPI, "deepseek") {
return false
}
- host := u.Hostname()
- return host == "localhost" || host == "127.0.0.1" || host == "::1"
+ return true
}
// getModelColor returns the cached color tag for the model name.