pull fixes

This commit is contained in:
Michael Yang
2023-07-12 09:55:07 -07:00
parent e1f0a0dc74
commit 0944b01e7d
3 changed files with 14 additions and 18 deletions

View File

@@ -59,7 +59,7 @@ func pull(model string) error {
&api.PullRequest{Model: model},
func(progress api.PullProgress) error {
if bar == nil {
if progress.Percent == 100 {
if progress.Percent >= 100 {
// already downloaded
return nil
}
@@ -73,10 +73,9 @@ func pull(model string) error {
}
func RunGenerate(_ *cobra.Command, args []string) error {
// join all args into a single prompt
prompt := strings.Join(args[1:], " ")
if len(args) > 1 {
return generate(args[0], prompt)
// join all args into a single prompt
return generate(args[0], strings.Join(args[1:], " "))
}
if term.IsTerminal(int(os.Stdin.Fd())) {