mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-05-30 12:39:58 +08:00
constrain edge value of serveWeight for llm
This commit is contained in:
@@ -34,6 +34,14 @@ const pickLlmConfigFromList = (llmConfigList) => {
|
||||
if (!llmConfigList.length) {
|
||||
return null
|
||||
}
|
||||
llmConfigList.forEach((conf) => {
|
||||
if (!Number(conf.serveWeight) || conf.serveWeight < 1) {
|
||||
conf.serveWeight = 1
|
||||
}
|
||||
if (conf.serveWeight > 100) {
|
||||
conf.serveWeight = 100
|
||||
}
|
||||
})
|
||||
const pool: number[] = []
|
||||
for (let i = 0; i < llmConfigList.length; i++) {
|
||||
for (let j = 0; j < Math.floor(llmConfigList[i].serveWeight); j++) {
|
||||
|
||||
@@ -188,13 +188,13 @@
|
||||
<el-input-number
|
||||
v-if="formContent.length > 1"
|
||||
v-model="conf.serveWeight"
|
||||
:min="0"
|
||||
:min="1"
|
||||
:max="100"
|
||||
:step="1"
|
||||
step-strictly
|
||||
:precision="0"
|
||||
font-size-12px
|
||||
placeholder="0 ~ 100"
|
||||
placeholder="1 ~ 100"
|
||||
@change="
|
||||
(new_val, old_val) => {
|
||||
gtagRenderer('serve_weight_changed', { new_val, old_val })
|
||||
|
||||
Reference in New Issue
Block a user