Documentation ¶
Index ¶
- func AddChannel(c *gin.Context)
- func AddChannels(c *gin.Context)
- func AddToken(c *gin.Context)
- func AutomaticallyTestChannels(frequency int)
- func AutomaticallyUpdateChannels(frequency int)
- func BuiltinModels(c *gin.Context)
- func ChannelDefaultModelMapping(c *gin.Context)
- func ChannelDefaultModelMappingByType(c *gin.Context)
- func ChannelDefaultModels(c *gin.Context)
- func ChannelDefaultModelsAndMapping(c *gin.Context)
- func ChannelDefaultModelsAndMappingByType(c *gin.Context)
- func ChannelDefaultModelsByType(c *gin.Context)
- func CreateGroup(c *gin.Context)
- func DeleteChannel(c *gin.Context)
- func DeleteGroup(c *gin.Context)
- func DeleteGroupToken(c *gin.Context)
- func DeleteHistoryLogs(c *gin.Context)
- func DeleteToken(c *gin.Context)
- func EnabledModels(c *gin.Context)
- func EnabledModelsAndPrice(c *gin.Context)
- func EnabledType2Models(c *gin.Context)
- func EnabledType2ModelsAndPrice(c *gin.Context)
- func GetAllChannels(c *gin.Context)
- func GetAuthHeader(token string) http.Header
- func GetChannel(c *gin.Context)
- func GetChannels(c *gin.Context)
- func GetGroup(c *gin.Context)
- func GetGroupDashboard(c *gin.Context)
- func GetGroupLogs(c *gin.Context)
- func GetGroupToken(c *gin.Context)
- func GetGroupTokens(c *gin.Context)
- func GetGroups(c *gin.Context)
- func GetLogs(c *gin.Context)
- func GetLogsSelfStat(c *gin.Context)
- func GetLogsStat(c *gin.Context)
- func GetOptions(c *gin.Context)
- func GetResponseBody(method, url string, _ *model.Channel, headers http.Header) ([]byte, error)
- func GetStatus(c *gin.Context)
- func GetSubscription(c *gin.Context)
- func GetToken(c *gin.Context)
- func GetTokens(c *gin.Context)
- func GetUsage(c *gin.Context)
- func ListModels(c *gin.Context)
- func ModelPrice(c *gin.Context)
- func Relay(c *gin.Context)
- func RelayNotFound(c *gin.Context)
- func RelayNotImplemented(c *gin.Context)
- func RetrieveModel(c *gin.Context)
- func SearchChannels(c *gin.Context)
- func SearchConsumeError(c *gin.Context)
- func SearchGroupLogs(c *gin.Context)
- func SearchGroupTokens(c *gin.Context)
- func SearchGroups(c *gin.Context)
- func SearchLogs(c *gin.Context)
- func SearchTokens(c *gin.Context)
- func TestChannel(c *gin.Context)
- func TestChannels(c *gin.Context)
- func UpdateAllChannelsBalance(c *gin.Context)
- func UpdateChannel(c *gin.Context)
- func UpdateChannelBalance(c *gin.Context)
- func UpdateChannelStatus(c *gin.Context)
- func UpdateGroupQPM(c *gin.Context)
- func UpdateGroupStatus(c *gin.Context)
- func UpdateGroupToken(c *gin.Context)
- func UpdateGroupTokenName(c *gin.Context)
- func UpdateGroupTokenStatus(c *gin.Context)
- func UpdateOption(c *gin.Context)
- func UpdateOptions(c *gin.Context)
- func UpdateToken(c *gin.Context)
- func UpdateTokenName(c *gin.Context)
- func UpdateTokenStatus(c *gin.Context)
- type AIProxyUserOverviewResponse
- type APGC2DGPTUsageResponse
- type API2GPTUsageResponse
- type AddChannelRequest
- type AddTokenRequest
- type CreateGroupRequest
- type OpenAICreditGrants
- type OpenAIModelPermission
- type OpenAIModels
- type OpenAISBUsageResponse
- type OpenAISubscriptionResponse
- type OpenAIUsageDailyCost
- type OpenAIUsageResponse
- type SiliconFlowUsageResponse
- type StatusData
- type UpdateChannelRequest
- type UpdateChannelStatusRequest
- type UpdateGroupQPMRequest
- type UpdateGroupStatusRequest
- type UpdateGroupTokenStatusRequest
- type UpdateTokenNameRequest
- type UpdateTokenStatusRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddChannel ¶
func AddChannels ¶
func AutomaticallyTestChannels ¶
func AutomaticallyTestChannels(frequency int)
func AutomaticallyUpdateChannels ¶
func AutomaticallyUpdateChannels(frequency int)
func BuiltinModels ¶
func ChannelDefaultModels ¶
func CreateGroup ¶
func DeleteChannel ¶
func DeleteGroup ¶
func DeleteGroupToken ¶
func DeleteHistoryLogs ¶
func DeleteToken ¶
func EnabledModels ¶
func EnabledModelsAndPrice ¶
func EnabledType2Models ¶
func GetAllChannels ¶
func GetChannel ¶
func GetChannels ¶
func GetGroupDashboard ¶
func GetGroupLogs ¶
func GetGroupToken ¶
func GetGroupTokens ¶
func GetLogsSelfStat ¶
func GetLogsStat ¶
func GetOptions ¶
func GetResponseBody ¶
func ListModels ¶
func ModelPrice ¶
func RelayNotFound ¶
func RelayNotImplemented ¶
func RetrieveModel ¶
func SearchChannels ¶
func SearchConsumeError ¶
func SearchGroupLogs ¶
func SearchGroupTokens ¶
func SearchGroups ¶
func SearchLogs ¶
func SearchTokens ¶
func TestChannel ¶
func TestChannels ¶
func UpdateChannel ¶
func UpdateChannelBalance ¶
func UpdateChannelStatus ¶
func UpdateGroupQPM ¶
func UpdateGroupStatus ¶
func UpdateGroupToken ¶
func UpdateGroupTokenName ¶
func UpdateGroupTokenStatus ¶
func UpdateOption ¶
func UpdateOptions ¶
func UpdateToken ¶
func UpdateTokenName ¶
func UpdateTokenStatus ¶
Types ¶
type APGC2DGPTUsageResponse ¶
type API2GPTUsageResponse ¶
type AddChannelRequest ¶
type AddChannelRequest struct { ModelMapping map[string]string `json:"model_mapping"` Config model.ChannelConfig `json:"config"` Name string `json:"name"` Key string `json:"key"` BaseURL string `json:"base_url"` Other string `json:"other"` Models []string `json:"models"` Type int `json:"type"` Priority int32 `json:"priority"` Status int `json:"status"` }
func (*AddChannelRequest) ToChannel ¶
func (r *AddChannelRequest) ToChannel() *model.Channel
func (*AddChannelRequest) ToChannels ¶
func (r *AddChannelRequest) ToChannels() []*model.Channel
type AddTokenRequest ¶
type CreateGroupRequest ¶
type OpenAICreditGrants ¶
type OpenAIModelPermission ¶
type OpenAIModelPermission struct { Group *string `json:"group"` ID string `json:"id"` Object string `json:"object"` Organization string `json:"organization"` Created int `json:"created"` AllowCreateEngine bool `json:"allow_create_engine"` AllowSampling bool `json:"allow_sampling"` AllowLogprobs bool `json:"allow_logprobs"` AllowSearchIndices bool `json:"allow_search_indices"` AllowView bool `json:"allow_view"` AllowFineTuning bool `json:"allow_fine_tuning"` IsBlocking bool `json:"is_blocking"` }
type OpenAIModels ¶
type OpenAISBUsageResponse ¶
type OpenAISubscriptionResponse ¶
type OpenAISubscriptionResponse struct { Object string `json:"object"` HasPaymentMethod bool `json:"has_payment_method"` SoftLimitUSD float64 `json:"soft_limit_usd"` HardLimitUSD float64 `json:"hard_limit_usd"` SystemHardLimitUSD float64 `json:"system_hard_limit_usd"` AccessUntil int64 `json:"access_until"` }
type OpenAIUsageDailyCost ¶
type OpenAIUsageResponse ¶
type SiliconFlowUsageResponse ¶
type SiliconFlowUsageResponse struct { Message string `json:"message"` Data struct { ID string `json:"id"` Name string `json:"name"` Image string `json:"image"` Email string `json:"email"` Balance string `json:"balance"` Status string `json:"status"` Introduction string `json:"introduction"` Role string `json:"role"` ChargeBalance string `json:"chargeBalance"` TotalBalance string `json:"totalBalance"` Category string `json:"category"` IsAdmin bool `json:"isAdmin"` } `json:"data"` Code int `json:"code"` Status bool `json:"status"` }
type StatusData ¶
type StatusData struct {
StartTime int64 `json:"startTime"`
}
type UpdateChannelRequest ¶
type UpdateChannelRequest struct { AddChannelRequest ID int `json:"id"` }
func (*UpdateChannelRequest) ToChannel ¶
func (r *UpdateChannelRequest) ToChannel() *model.Channel
type UpdateChannelStatusRequest ¶
type UpdateChannelStatusRequest struct {
Status int `json:"status"`
}
type UpdateGroupQPMRequest ¶
type UpdateGroupQPMRequest struct {
QPM int64 `json:"qpm"`
}
type UpdateGroupStatusRequest ¶
type UpdateGroupStatusRequest struct {
Status int `json:"status"`
}
type UpdateGroupTokenStatusRequest ¶
type UpdateGroupTokenStatusRequest struct {
UpdateTokenStatusRequest
}
type UpdateTokenNameRequest ¶
type UpdateTokenNameRequest struct {
Name string `json:"name"`
}
type UpdateTokenStatusRequest ¶
type UpdateTokenStatusRequest struct {
Status int `json:"status"`
}
Click to show internal directories.
Click to hide internal directories.