Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
12fb3cb9
authored
Jun 03, 2023
by
JustSong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: prompt user the feat is not implemented (#125)
parent
4172e9b6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
controller/channel-billing.go
+4
-0
No files found.
controller/channel-billing.go
View file @
12fb3cb9
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment