LocalAI/core/cli
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
..
context feat(llama.cpp): Totally decentralized, private, distributed, p2p inference (#2343) 2024-05-20 19:17:59 +02:00
worker feat(p2p): Federation and AI swarms (#2723) 2024-07-08 22:04:06 +02:00
cli.go feat(p2p): Federation and AI swarms (#2723) 2024-07-08 22:04:06 +02:00
federated.go fix: short-circuit when nodes aren't detected (#2909) 2024-07-18 14:44:31 +02:00
models.go feat: HF /scan endpoint (#2566) 2024-07-10 13:18:32 +02:00
run.go fix: short-circuit when nodes aren't detected (#2909) 2024-07-18 14:44:31 +02:00
transcript.go fix(cli): remove duplicate alias (#2654) 2024-06-25 10:08:13 +02:00
tts.go chore: fix go.mod module (#2635) 2024-06-23 08:24:36 +00:00
util.go feat: HF /scan endpoint (#2566) 2024-07-10 13:18:32 +02:00