mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-20 10:35:01 +00:00
fix(p2p): parse correctly ExtraLLamaCPPArgs (#4220)
Previously we were sensible when args aren't defined and we would clash parsing extra args. Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
47dc4337ba
commit
f028ee8a26
1 changed files with 7 additions and 1 deletions
|
@ -76,8 +76,14 @@ func (r *P2P) Run(ctx *cliContext.Context) error {
|
||||||
"util",
|
"util",
|
||||||
"llama-cpp-rpc-server",
|
"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...)
|
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)
|
args, grpcProcess = library.LoadLDSO(r.BackendAssetsPath, args, grpcProcess)
|
||||||
|
|
||||||
cmd := exec.Command(
|
cmd := exec.Command(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue