Commit 12fb3cb9 by JustSong

fix: prompt user the feat is not implemented (#125)

parent 4172e9b6
...@@ -40,10 +40,14 @@ type OpenAIUsageResponse struct { ...@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment