pr feedback

- move error check to api client pull
- simplify error check in generate
- return nil on any pull error
This commit is contained in:
Bruce MacDonald
2023-07-07 17:12:02 -04:00
parent 61dd87bd90
commit f533f85d44
3 changed files with 13 additions and 19 deletions

View File

@@ -7,7 +7,6 @@ import (
"fmt"
"log"
"net"
"net/http"
"os"
"path"
"strings"
@@ -51,10 +50,6 @@ func pull(model string) error {
context.Background(),
&api.PullRequest{Model: model},
func(progress api.PullProgress) error {
if progress.Error.Code == http.StatusBadGateway {
// couldn't pull the model from the directory, proceed in offline mode
return nil
}
if bar == nil && progress.Percent == 100 {
// already downloaded
return nil