client/ollama: docs for Error type
This commit is contained in:
parent
6acc205de0
commit
a32e7857b2
@ -77,9 +77,20 @@ func (c *Client) Run(ctx context.Context, ref string, messages []apitype.Message
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Error struct {
|
type Error struct {
|
||||||
|
// Status is the HTTP status code returned by the server.
|
||||||
Status int `json:"status"`
|
Status int `json:"status"`
|
||||||
|
|
||||||
|
// Code specifies a machine readable code indicating the class of
|
||||||
|
// error this error is. See http://docs.ollama.com/errors for a full
|
||||||
|
// list of error codes.
|
||||||
Code string `json:"code"`
|
Code string `json:"code"`
|
||||||
|
|
||||||
|
// Message is a humage readable message that describes the error. It
|
||||||
|
// may change across versions of the API, so it should not be used for
|
||||||
|
// programmatic decisions.
|
||||||
Message string `json:"message"`
|
Message string `json:"message"`
|
||||||
|
|
||||||
|
// Field is the field in the request that caused the error, if any.
|
||||||
Field string `json:"field,omitempty"`
|
Field string `json:"field,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user