Skip to content

Commit

Permalink
fix(p2p): parse correctly ExtraLLamaCPPArgs
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 committed Nov 21, 2024
1 parent 47dc433 commit 82c094a
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 82c094a

Please sign in to comment.