adaptor

package
v0.0.0-...-4a3b078 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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) (string, http.Header, io.Reader, error)
	DoRequest(meta *meta.Meta, c *gin.Context, req *http.Request) (*http.Response, error)
	DoResponse(meta *meta.Meta, c *gin.Context, resp *http.Response) (*relaymodel.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