Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
fix: ollama host for hostname
Michael Yang459f4a7889f4
diff --git a/api/client.go b/api/client.goindex 14ea353d6..3cf55a25f 100644--- a/api/client.go+++ b/api/client.go@@ -52,8 +52,10 @@ func ClientFromEnvironment() (*Client, error) {host, port, err := net.SplitHostPort(hostport)if err != nil {host, port = "127.0.0.1", "11434"- if ip := net.ParseIP(strings.Trim(os.Getenv("OLLAMA_HOST"), "[]")); ip != nil {+ if ip := net.ParseIP(strings.Trim(hostport, "[]")); ip != nil {host = ip.String()+ } else if hostport != "" {+ host = hostport}}