Documentation
¶
Overview ¶
Package pegwingerrs provides error types for the pegwings-go library.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type APIError struct {
// Code is the code of the error.
Code any `json:"code,omitempty"`
// Message is the message of the error.
Message string `json:"message"`
// Param is the param of the error.
Param *string `json:"param,omitempty"`
// Type is the type of the error.
Type string `json:"type"`
// HTTPStatusCode is the status code of the error.
HTTPStatusCode int `json:"-"`
}
APIError provides error information returned by the Groq API.
func (*APIError) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
type ErrContentFieldsMisused ¶
type ErrContentFieldsMisused struct{}
ErrContentFieldsMisused is an error that occurs when both Content and MultiContent properties are set.
func (ErrContentFieldsMisused) Error ¶
func (e ErrContentFieldsMisused) Error() string
Error implements the error interface.
type ErrRequest ¶
ErrRequest is a request error.
func (*ErrRequest) Error ¶
func (e *ErrRequest) Error() string
Error implements the error interface.
type ErrTooManyEmptyStreamMessages ¶
type ErrTooManyEmptyStreamMessages struct{}
ErrTooManyEmptyStreamMessages is returned when the stream has sent too many empty messages.
func (ErrTooManyEmptyStreamMessages) Error ¶
func (e ErrTooManyEmptyStreamMessages) Error() string
Error returns the error message.
type ErrToolNotFound ¶
type ErrToolNotFound struct {
ToolName string
}
ErrToolNotFound is returned when a tool is not found.
func (ErrToolNotFound) Error ¶
func (e ErrToolNotFound) Error() string
Error implements the error interface.
type ErrorBuffer ¶
ErrorBuffer is a buffer that allows for appending errors.
type ErrorResponse ¶
type ErrorResponse struct {
Error *APIError `json:"error,omitempty"`
}
ErrorResponse is the response returned by the Groq API.