Skip to content

Commit

Permalink
Minor fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
mudler committed Jul 6, 2024
1 parent 399f4de commit 3af5fe7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion core/http/views/p2p.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@

<div class="models mt-12 text-center">
<h2 class="text-3xl font-semibold text-gray-100 mb-8">
<i class="fa-solid fa-network-wired"></i> P2P Network</h2>
<i class="fa-solid fa-network-wired"></i> P2P Network <a href="https://localai.io/features/distribute/" target="_blank" >
<i class="fas fa-circle-info pr-2"></i>
</a> </h2>

<div class="bg-gray-800 p-6 rounded-lg shadow-lg mb-8 inline-block">
<p class="text-xl font-semibold text-gray-200">Total Workers Detected: {{ len .Nodes}}</p>
Expand Down
6 changes: 4 additions & 2 deletions core/p2p/p2p.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func LLamaCPPRPCServerDiscoverer(ctx context.Context, token string) error {
AddNode(tunnel)

var tunnelAddresses []string
for _, v := range nodes {
for _, v := range GetAvailableNodes() {
if v.IsOnline() {
tunnelAddresses = append(tunnelAddresses, v.TunnelAddress)
} else {
Expand Down Expand Up @@ -237,7 +237,9 @@ func discoveryTunnels(ctx context.Context, token string) (chan NodeData, error)
}
ensureService(ctx, n, nd, k)
muservice.Lock()
tunnels <- service[nd.Name].NodeData
if _, ok := service[nd.Name]; ok {
tunnels <- service[nd.Name].NodeData
}
muservice.Unlock()
}
}
Expand Down

0 comments on commit 3af5fe7

Please sign in to comment.