Skip to content

Commit

Permalink
Merge pull request #2851 from rockwotj/ollama-logs
Browse files Browse the repository at this point in the history
  • Loading branch information
rockwotj authored Sep 9, 2024
2 parents 5d39a03 + cf77aa8 commit d18110e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/impl/ollama/base_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,11 @@ func newBaseProcessor(conf *service.ParsedConfig, mgr *service.Resources) (p *ba
if err = p.waitForServer(context.Background()); err != nil {
return
}
p.logger.Infof("Pulling %q", p.model)
if err = p.pullModel(context.Background()); err != nil {
return
}
p.logger.Infof("Finished pulling %q", p.model)
return
}

Expand All @@ -360,7 +362,7 @@ func (o *baseOllamaProcessor) pullModel(ctx context.Context) error {
Model: o.model,
}
return o.client.Pull(ctx, &pr, func(resp api.ProgressResponse) error {
o.logger.Infof("Pulling %q: %s [%s/%s]", o.model, resp.Status, humanize.Bytes(uint64(resp.Completed)), humanize.Bytes(uint64(resp.Total)))
o.logger.Tracef("Pulling %q: %s [%s/%s]", o.model, resp.Status, humanize.Bytes(uint64(resp.Completed)), humanize.Bytes(uint64(resp.Total)))
return nil
})
}
Expand Down

0 comments on commit d18110e

Please sign in to comment.