Skip to content

Commit

Permalink
fix(p2p): parse correctly ExtraLLamaCPPArgs (#4220)
Browse files Browse the repository at this point in the history
Previously we were sensible when args aren't defined and we would clash
parsing extra args.

Signed-off-by: Ettore Di Giacinto <[email protected]>
  • Loading branch information
mudler authored Nov 21, 2024
1 parent 47dc433 commit f028ee8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion core/cli/worker/worker_p2p.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,14 @@ func (r *P2P) Run(ctx *cliContext.Context) error {
"util",
"llama-cpp-rpc-server",
)
extraArgs := strings.Split(r.ExtraLLamaCPPArgs, " ")
var extraArgs []string

if r.ExtraLLamaCPPArgs != "" {
extraArgs = strings.Split(r.ExtraLLamaCPPArgs, " ")
}
args := append([]string{"--host", address, "--port", fmt.Sprint(port)}, extraArgs...)
log.Debug().Msgf("Starting llama-cpp-rpc-server on '%s:%d' with args: %+v (%d)", address, port, args, len(args))

args, grpcProcess = library.LoadLDSO(r.BackendAssetsPath, args, grpcProcess)

cmd := exec.Command(
Expand Down

0 comments on commit f028ee8

Please sign in to comment.