LocalAI/core
Ettore Di Giacinto c7357a9872
fix: short-circuit when nodes aren't detected (#2909)
Fixes:

```
panic: invalid argument to IntN

goroutine 401 [running]:
math/rand/v2.(*Rand).IntN(...)
        /home/mudler/_git/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.4.linux-amd64/src/math/rand/v2/rand.go:190
math/rand/v2.IntN(...)
        /home/mudler/_git/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.4.linux-amd64/src/math/rand/v2/rand.go:307
github.com/mudler/LocalAI/core/cli.Proxy.func2()
        /home/mudler/_git/LocalAI/core/cli/federated.go:104 +0x76e
created by github.com/mudler/LocalAI/core/cli.Proxy in goroutine 1
        /home/mudler/_git/LocalAI/core/cli/federated.go:91 +0x3c5
```

When no nodes are found and something is trying to hit the federated
endpoint (and no tunnels are ready yet).

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2024-07-18 14:44:31 +02:00
..
backend feat(llama.cpp): support embeddings endpoints (#2871) 2024-07-15 22:54:16 +02:00
cli fix: short-circuit when nodes aren't detected (#2909) 2024-07-18 14:44:31 +02:00
clients feat(store): add Golang client (#1977) 2024-04-16 15:54:14 +02:00
config feat(llama.cpp): support embeddings endpoints (#2871) 2024-07-15 22:54:16 +02:00
dependencies_manager chore: fix go.mod module (#2635) 2024-06-23 08:24:36 +00:00
gallery docs: more swagger, update docs (#2907) 2024-07-18 11:25:21 +02:00
http docs: more swagger, update docs (#2907) 2024-07-18 11:25:21 +02:00
p2p fix: short-circuit when nodes aren't detected (#2909) 2024-07-18 14:44:31 +02:00
schema docs(swagger): core more localai/openai endpoints (#2904) 2024-07-18 00:38:41 -04:00
services feat(model-list): be consistent, skip known files from listing (#2760) 2024-07-10 15:28:39 +02:00
startup chore(deps): Update Dependencies (#2538) 2024-07-12 19:54:08 +00:00
application.go feat(model-list): be consistent, skip known files from listing (#2760) 2024-07-10 15:28:39 +02:00