反代 不查询余额
This commit is contained in:
parent
5ce638a4d4
commit
aeb4685f2f
@ -9,6 +9,7 @@ import (
|
|||||||
"one-api/common"
|
"one-api/common"
|
||||||
"one-api/model"
|
"one-api/model"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
@ -160,6 +161,9 @@ func updateChannelBalance(channel *model.Channel) (float64, error) {
|
|||||||
case common.ChannelTypeAzure:
|
case common.ChannelTypeAzure:
|
||||||
return 0, errors.New("尚未实现")
|
return 0, errors.New("尚未实现")
|
||||||
case common.ChannelTypeCustom:
|
case common.ChannelTypeCustom:
|
||||||
|
if strings.Contains(channel.Name, "反代") {
|
||||||
|
return 0, errors.New("尚未实现")
|
||||||
|
}
|
||||||
baseURL = channel.BaseURL
|
baseURL = channel.BaseURL
|
||||||
case common.ChannelTypeOpenAISB:
|
case common.ChannelTypeOpenAISB:
|
||||||
return updateChannelOpenAISBBalance(channel)
|
return updateChannelOpenAISBBalance(channel)
|
||||||
|
Loading…
Reference in New Issue
Block a user