From 1e1c6a828f0d14b921fd0946916b0ec344719509 Mon Sep 17 00:00:00 2001 From: JustSong Date: Sat, 3 Jun 2023 11:09:14 +0800 Subject: [PATCH] fix: prompt user the feat is not implemented (#125) --- controller/channel-billing.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/controller/channel-billing.go b/controller/channel-billing.go index 63ec8a84..5ab0ac7b 100644 --- a/controller/channel-billing.go +++ b/controller/channel-billing.go @@ -40,10 +40,14 @@ type OpenAIUsageResponse struct { func updateChannelBalance(channel *model.Channel) (float64, error) { baseURL := common.ChannelBaseURLs[channel.Type] switch channel.Type { + case common.ChannelTypeOpenAI: + // do nothing case common.ChannelTypeAzure: return 0, errors.New("尚未实现") case common.ChannelTypeCustom: baseURL = channel.BaseURL + default: + return 0, errors.New("尚未实现") } url := fmt.Sprintf("%s/v1/dashboard/billing/subscription", baseURL)