exception

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSystemMessageMustInIndexZero = NewExceptionWithMessage(400, "系统消息必须位于消息列表第一个")
	ErrInvalidMessageType           = NewExceptionWithMessage(400, "不支持的消息类型")
	ErrInvalidContentType           = NewExceptionWithMessage(400, "不支持的信息类型")
	ErrResponseNoChoice             = NewExceptionWithMessage(400, "响应中没有输出")
	ErrProviderNotFound             = NewExceptionWithMessage(404, "找不到对应AI-Provider")
)

Functions

This section is empty.

Types

type Exception

type Exception struct {
	// contains filtered or unexported fields
}

func NewException

func NewException(code int, cause error) *Exception

func NewExceptionWithMessage

func NewExceptionWithMessage(code int, message string) *Exception

func (*Exception) Cause

func (e *Exception) Cause() error

func (*Exception) Code

func (e *Exception) Code() int

func (*Exception) Error

func (e *Exception) Error() string

func (*Exception) Message

func (e *Exception) Message() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL