fix: prompt user the feat is not implemented (#125)
This commit is contained in:
parent
2847a08852
commit
1e1c6a828f
@ -40,10 +40,14 @@ type OpenAIUsageResponse struct {
|
|||||||
func updateChannelBalance(channel *model.Channel) (float64, error) {
|
func updateChannelBalance(channel *model.Channel) (float64, error) {
|
||||||
baseURL := common.ChannelBaseURLs[channel.Type]
|
baseURL := common.ChannelBaseURLs[channel.Type]
|
||||||
switch channel.Type {
|
switch channel.Type {
|
||||||
|
case common.ChannelTypeOpenAI:
|
||||||
|
// do nothing
|
||||||
case common.ChannelTypeAzure:
|
case common.ChannelTypeAzure:
|
||||||
return 0, errors.New("尚未实现")
|
return 0, errors.New("尚未实现")
|
||||||
case common.ChannelTypeCustom:
|
case common.ChannelTypeCustom:
|
||||||
baseURL = channel.BaseURL
|
baseURL = channel.BaseURL
|
||||||
|
default:
|
||||||
|
return 0, errors.New("尚未实现")
|
||||||
}
|
}
|
||||||
url := fmt.Sprintf("%s/v1/dashboard/billing/subscription", baseURL)
|
url := fmt.Sprintf("%s/v1/dashboard/billing/subscription", baseURL)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user