Clarify listener wording: Ollama-compatible clients, not Ollama-facing
This commit is contained in:
@@ -45,8 +45,8 @@ override file values. Invalid values fail at startup.
|
|||||||
|
|
||||||
| Var | Default | Meaning |
|
| Var | Default | Meaning |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `LISTEN_OLLAMA` | `:11434` | Ollama-facing listener |
|
| `LISTEN_OLLAMA` | `:11434` | Listener for Ollama-compatible clients |
|
||||||
| `LISTEN_COMFY` | `:8188` | ComfyUI-facing listener |
|
| `LISTEN_COMFY` | `:8188` | Listener for ComfyUI clients |
|
||||||
| `OLLAMA_URL` | _(empty = disabled)_ | Ollama upstream; set to enable the Ollama consumer |
|
| `OLLAMA_URL` | _(empty = disabled)_ | Ollama upstream; set to enable the Ollama consumer |
|
||||||
| `COMFY_URL` | _(empty = disabled)_ | ComfyUI upstream; set to enable the ComfyUI consumer |
|
| `COMFY_URL` | _(empty = disabled)_ | ComfyUI upstream; set to enable the ComfyUI consumer |
|
||||||
| `UNLOAD_TIMEOUT` | `60s` | Wait for Ollama to unload before an image job |
|
| `UNLOAD_TIMEOUT` | `60s` | Wait for Ollama to unload before an image job |
|
||||||
|
|||||||
@@ -131,8 +131,8 @@ override file values. A missing file is fine; a malformed one is fatal.
|
|||||||
|
|
||||||
| Var | Default | Meaning |
|
| Var | Default | Meaning |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `LISTEN_OLLAMA` | `:11434` | Ollama-facing listener |
|
| `LISTEN_OLLAMA` | `:11434` | listener for Ollama-compatible clients |
|
||||||
| `LISTEN_COMFY` | `:8188` | ComfyUI-facing listener |
|
| `LISTEN_COMFY` | `:8188` | listener for ComfyUI clients |
|
||||||
| `OLLAMA_URL` | _(empty = disabled)_ | Ollama upstream; set to enable the Ollama consumer |
|
| `OLLAMA_URL` | _(empty = disabled)_ | Ollama upstream; set to enable the Ollama consumer |
|
||||||
| `COMFY_URL` | _(empty = disabled)_ | ComfyUI upstream; set to enable the ComfyUI consumer |
|
| `COMFY_URL` | _(empty = disabled)_ | ComfyUI upstream; set to enable the ComfyUI consumer |
|
||||||
| `UNLOAD_TIMEOUT` | `60s` | wait for Ollama to unload |
|
| `UNLOAD_TIMEOUT` | `60s` | wait for Ollama to unload |
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ const appVerComment = `Version to run: "dev" disables updates, "stable" tracks t
|
|||||||
// CFG_VER and APP_VER are not entries — they head the file, always active.
|
// CFG_VER and APP_VER are not entries — they head the file, always active.
|
||||||
func sampleEntries(logFile string) []sampleEntry {
|
func sampleEntries(logFile string) []sampleEntry {
|
||||||
return []sampleEntry{
|
return []sampleEntry{
|
||||||
{"LISTEN_OLLAMA", ":11434", "Ollama-facing listener address", false},
|
{"LISTEN_OLLAMA", ":11434", "Listen address for Ollama-compatible clients (gpu-turnstile poses as Ollama here)", false},
|
||||||
{"LISTEN_COMFY", ":8188", "ComfyUI-facing listener address", false},
|
{"LISTEN_COMFY", ":8188", "Listen address for ComfyUI clients (gpu-turnstile poses as ComfyUI here)", false},
|
||||||
{"OLLAMA_URL", "http://127.0.0.1:11434", "Ollama upstream URL; setting it enables the Ollama consumer (default: empty = disabled)", false},
|
{"OLLAMA_URL", "http://127.0.0.1:11434", "Ollama upstream URL; setting it enables the Ollama consumer (default: empty = disabled)", false},
|
||||||
{"COMFY_URL", "http://127.0.0.1:8188", "ComfyUI upstream URL; setting it enables the ComfyUI consumer (default: empty = disabled)", false},
|
{"COMFY_URL", "http://127.0.0.1:8188", "ComfyUI upstream URL; setting it enables the ComfyUI consumer (default: empty = disabled)", false},
|
||||||
{"WARM_MODEL", "", "Optional model to reload after an image job (default: empty = none)", false},
|
{"WARM_MODEL", "", "Optional model to reload after an image job (default: empty = none)", false},
|
||||||
|
|||||||
@@ -438,7 +438,7 @@ func isLLMRequest(r *http.Request) bool {
|
|||||||
return r.Method == http.MethodPost && llmPaths[r.URL.Path]
|
return r.Method == http.MethodPost && llmPaths[r.URL.Path]
|
||||||
}
|
}
|
||||||
|
|
||||||
// OllamaHandler serves the Ollama-facing listener.
|
// OllamaHandler serves the listener for Ollama-compatible clients.
|
||||||
func (s *Server) OllamaHandler() http.Handler {
|
func (s *Server) OllamaHandler() http.Handler {
|
||||||
return s.logRequests("ollama", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
return s.logRequests("ollama", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
switch r.URL.Path {
|
switch r.URL.Path {
|
||||||
@@ -485,7 +485,7 @@ func (s *Server) OllamaHandler() http.Handler {
|
|||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
// ComfyHandler serves the ComfyUI-facing listener.
|
// ComfyHandler serves the listener for ComfyUI clients.
|
||||||
func (s *Server) ComfyHandler() http.Handler {
|
func (s *Server) ComfyHandler() http.Handler {
|
||||||
return s.logRequests("comfy", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
return s.logRequests("comfy", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
switch r.URL.Path {
|
switch r.URL.Path {
|
||||||
|
|||||||
@@ -46,8 +46,8 @@ type fakes struct {
|
|||||||
rec *recorder
|
rec *recorder
|
||||||
ollama *httptest.Server
|
ollama *httptest.Server
|
||||||
comfy *httptest.Server
|
comfy *httptest.Server
|
||||||
server *httptest.Server // Ollama-facing gpu-turnstile listener
|
server *httptest.Server // gpu-turnstile listener for Ollama-compatible clients
|
||||||
comfySrv *httptest.Server // ComfyUI-facing gpu-turnstile listener
|
comfySrv *httptest.Server // gpu-turnstile listener for ComfyUI clients
|
||||||
freeCh chan struct{}
|
freeCh chan struct{}
|
||||||
chatCh chan struct{}
|
chatCh chan struct{}
|
||||||
historyMu sync.Mutex
|
historyMu sync.Mutex
|
||||||
|
|||||||
Reference in New Issue
Block a user