Ollama ps command for showing currently loaded models (#4327)

This commit is contained in:
Patrick Devine
2024-05-13 17:17:36 -07:00
committed by GitHub
parent 9eed4a90ce
commit 6845988807
10 changed files with 193 additions and 50 deletions

View File

@@ -56,6 +56,11 @@ func loadModel(cmd *cobra.Command, opts *runOptions) error {
Model: opts.Model,
Messages: []api.Message{},
}
if opts.KeepAlive != nil {
chatReq.KeepAlive = opts.KeepAlive
}
err = client.Chat(cmd.Context(), chatReq, func(resp api.ChatResponse) error {
p.StopAndClear()
if len(opts.Messages) > 0 {