-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
errors.go
26 lines (24 loc) · 1.5 KB
/
errors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package fun
import "gitlab.com/tozd/go/errors"
var (
ErrAlreadyInitialized = errors.Base("already initialized")
ErrMultipleSystemMessages = errors.Base("multiple system messages")
ErrGaveUpRetry = errors.Base("gave up retrying")
ErrAPIRequestFailed = errors.Base("API request failed")
ErrAPIResponseError = errors.Base("API response error")
ErrMissingRequestID = errors.Base("missing request ID")
ErrModelNotActive = errors.Base("model not active")
ErrUnexpectedRole = errors.Base("unexpected role")
ErrUnexpectedNumberOfMessages = errors.Base("unexpected number of messages")
ErrUnexpectedMessageType = errors.Base("unexpected message type")
ErrUnexpectedStop = errors.Base("unexpected stop")
ErrUnexpectedNumberOfTokens = errors.Base("unexpected number of tokens")
ErrModelMaxContextLength = errors.Base("unable to determine model max context length")
ErrMaxContextLengthOverModel = errors.Base("max context length over what model supports")
ErrMaxResponseLengthOverContext = errors.Base("max response length over max context length")
ErrJSONSchemaValidation = errors.Base("JSON Schema validation error")
ErrRefused = errors.Base("refused")
ErrInvalidJSONSchema = errors.Base("invalid JSON Schema")
ErrToolNotFound = errors.Base("tool not found")
ErrToolCallsWithoutCalls = errors.Base("tool calls without calls")
)