Ver Fonte

chore: only check OpenAI channel & custom channel

JustSong há 2 anos atrás
pai
commit
f9f42997b2
1 ficheiros alterados com 4 adições e 0 exclusões
  1. 4 0
      controller/channel-billing.go

+ 4 - 0
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