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
b5b6fcef
authored
Dec 26, 2023
by
CaIon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
恢复渠道优先级可设置为负数
parent
65166c1f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
controller/relay-utils.go
+3
-3
web/src/components/ChannelsTable.js
+1
-1
No files found.
controller/relay-utils.go
View file @
b5b6fcef
...
...
@@ -194,12 +194,12 @@ func countTokenMessages(messages []Message, model string) (int, error) {
}
func
countTokenInput
(
input
any
,
model
string
)
int
{
switch
input
.
(
type
)
{
switch
v
:=
input
.
(
type
)
{
case
string
:
return
countTokenText
(
input
.
(
string
)
,
model
)
return
countTokenText
(
v
,
model
)
case
[]
string
:
text
:=
""
for
_
,
s
:=
range
input
.
([]
string
)
{
for
_
,
s
:=
range
v
{
text
+=
s
}
return
countTokenText
(
text
,
model
)
...
...
web/src/components/ChannelsTable.js
View file @
b5b6fcef
...
...
@@ -168,7 +168,7 @@ const ChannelsTable = () => {
manageChannel
(
record
.
id
,
'priority'
,
record
,
value
);
}}
defaultValue
=
{
record
.
priority
}
min
=
{
0
}
min
=
{
-
999
}
/
>
<
/div
>
);
...
...
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