From f9f42997b2176558ac033407c822d853485bb779 Mon Sep 17 00:00:00 2001 From: JustSong Date: Tue, 23 May 2023 10:00:36 +0800 Subject: [PATCH] chore: only check OpenAI channel & custom channel --- controller/channel-billing.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/controller/channel-billing.go b/controller/channel-billing.go index 65f74dce..e135e5fc 100644 --- a/controller/channel-billing.go +++ b/controller/channel-billing.go @@ -144,6 +144,10 @@ func updateAllChannelsBalance() error { if channel.Status != common.ChannelStatusEnabled { continue } + // TODO: support Azure + if channel.Type != common.ChannelTypeOpenAI && channel.Type != common.ChannelTypeCustom { + continue + } balance, err := updateChannelBalance(channel) if err != nil { continue