adaptor

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrGetBalanceNotImplemented = errors.New("get balance not implemented")

Functions

This section is empty.

Types

type Adaptor

type Adaptor interface {
	GetChannelName() string
	GetBaseURL() string
	GetRequestURL(meta *meta.Meta) (string, error)
	SetupRequestHeader(meta *meta.Meta, c *gin.Context, req *http.Request) error
	ConvertRequest(meta *meta.Meta, req *http.Request) (method string, header http.Header, body io.Reader, err error)
	DoRequest(meta *meta.Meta, c *gin.Context, req *http.Request) (*http.Response, error)
	DoResponse(meta *meta.Meta, c *gin.Context, resp *http.Response) (*model.Usage, *relaymodel.ErrorWithStatusCode)
	GetModelList() []*model.ModelConfig
}

type Balancer

type Balancer interface {
	GetBalance(channel *model.Channel) (float64, error)
}

type KeyValidator

type KeyValidator interface {
	ValidateKey(key string) error
	KeyHelp() string
}

Directories

Path Synopsis
aws
claude
Package aws provides the AWS adaptor for the relay service.
Package aws provides the AWS adaptor for the relay service.
llama3
Package aws provides the AWS adaptor for the relay service.
Package aws provides the AWS adaptor for the relay service.

Jump to

Keyboard shortcuts

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