mirror of
https://github.com/ollama/ollama.git
synced 2025-05-11 10:26:53 +02:00
check server is running before running command
This commit is contained in:
parent
90ba0b80c7
commit
e72fe7945f
2 changed files with 72 additions and 25 deletions
|
@ -223,3 +223,10 @@ func (c *Client) Delete(ctx context.Context, req *DeleteRequest) error {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Client) Heartbeat(ctx context.Context) error {
|
||||
if err := c.do(ctx, http.MethodGet, "/", nil, nil); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue