mirror of
https://github.com/linux-do/new-api.git
synced 2025-09-18 00:16:37 +08:00
恢复渠道优先级可设置为负数
This commit is contained in:
parent
fd4ef086dc
commit
3c52a0991f
@ -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)
|
||||
|
@ -168,7 +168,7 @@ const ChannelsTable = () => {
|
||||
manageChannel(record.id, 'priority', record, value);
|
||||
}}
|
||||
defaultValue={record.priority}
|
||||
min={0}
|
||||
min={-999}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user