mirror of
https://github.com/ollama/ollama.git
synced 2025-05-11 18:36:41 +02:00
Ollama ps
command for showing currently loaded models (#4327)
This commit is contained in:
parent
9eed4a90ce
commit
6845988807
10 changed files with 193 additions and 50 deletions
|
@ -354,6 +354,15 @@ func (c *Client) List(ctx context.Context) (*ListResponse, error) {
|
|||
return &lr, nil
|
||||
}
|
||||
|
||||
// List running models.
|
||||
func (c *Client) ListRunning(ctx context.Context) (*ListResponse, error) {
|
||||
var lr ListResponse
|
||||
if err := c.do(ctx, http.MethodGet, "/api/ps", nil, &lr); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &lr, nil
|
||||
}
|
||||
|
||||
// Copy copies a model - creating a model with another name from an existing
|
||||
// model.
|
||||
func (c *Client) Copy(ctx context.Context, req *CopyRequest) error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue