liudong
2024-07-31 ff78eab3222b4c8b00d5f38ba8efee39d476a99f
src/views/dmx/knowledgeLib/tool.vue
@@ -20,7 +20,7 @@
      解析方法:
    </div>
    <div style="margin-left: 10px">
      <a-select v-model="form.parser_id" placeholder="请选择" width="200px">
      <a-select v-model="form.parser_id" placeholder="请选择" >
        <a-option v-for="item in parser_ids" :key="item.value" :label="item.name" :value="item.value"></a-option>
      </a-select>
    </div>
@@ -29,9 +29,7 @@
      <a-divider style="margin-top: 10px" />
      <a-form-item field="slider" label="块token数"
                   :rules="[{type:'number', min:1,message:'slider is min than 1'}]">
        <a-slider v-model="form.chunk_token_num" :max="1000" />
        <a-input-number v-model="form.chunk_token_num" :style="{width:'100px',marginLeft:'2rem',borderRadius:'4px'}"
                        placeholder="请输入" class="input-demo"  :max="1000" />
        <a-slider v-model="form.chunk_token_num" :max="1000" show-input />
      </a-form-item>
      <a-divider style="margin-top: 10px" />
      <a-form-item field="raptor" label="使用召回增强RAPTOR策略">
@@ -47,20 +45,14 @@
        </a-form-item>
        <a-form-item field="slider" label="最大token数"
                     :rules="[{type:'number', min:5,message:'slider is min than 5'}]">
          <a-slider v-model="form.max_token" :min="1" :max="1000"/>
          <a-input-number v-model="form.max_token" :style="{width:'100px',marginLeft:'2rem',borderRadius:'4px'}"
                          placeholder="Please Enter" class="input-demo" :min="10" :max="1000" />
          <a-slider v-model="form.max_token" :min="1" :max="1000" show-input/>
        </a-form-item>
        <a-form-item field="slider" label="阈值" :rules="[{type:'number', min:5,message:'slider is min than 5'}]">
          <a-slider v-model="form.threshold" :max="1" />
          <a-input-number v-model="form.threshold" :style="{width:'100px',marginLeft:'2rem',borderRadius:'4px'}"
                          placeholder="Please Enter" class="input-demo" :min="0" :max="1" />
          <a-slider v-model="form.threshold"  show-tooltip show-input/>
        </a-form-item>
        <a-form-item field="slider" label="最大聚类数"
                     :rules="[{type:'number', min:5,message:'slider is min than 5'}]">
          <a-slider v-model="form.max_cluster" :max="1000" />
          <a-input-number v-model="form.max_cluster" :style="{width:'100px',marginLeft:'2rem',borderRadius:'4px'}"
                          placeholder="Please Enter" class="input-demo" :min="10" :max="1000" />
          <a-slider v-model="form.max_cluster" :max="1000" show-input/>
        </a-form-item>
        <a-form-item field="slider" label="随机种子" v-model="form.random_seed"
                     :rules="[{type:'number', min:5,message:'slider is min than 5'}]">
@@ -84,7 +76,7 @@
</template>
<script lang="ts" setup>
import { onMounted ,onBeforeMount, reactive, ref } from "vue";
import { onMounted, onBeforeMount, reactive, ref, computed } from "vue";
import { Message } from "@arco-design/web-vue";
import {kbdocumentchangeparser} from "@/api/kbList";
const visible = ref(false);
@@ -92,6 +84,10 @@
const props =  defineProps(['kbtenantInfo','item','kbdetail'])
// const emit =  defineEmits(['upTabdateItem'])
let threshold = computed(()=>{
  return form.threshold/100;
})
const kbtenantInfo = props.kbtenantInfo;
@@ -107,7 +103,7 @@
  parser_id: props.item.parser_id,
  doc_id: props.item.id,
  max_token: 698,
  threshold: 0.32,
  threshold: 30,
  max_cluster: 233,
  random_seed: 1500,
  chunk_token_num: 128,
@@ -127,7 +123,9 @@
    },
  ],
}
const formatter = (value) => {
  return value / 100
};
  function randomNumber() {
    // 生成一个介于min和max之间的随机整数(包含min和max)
    const min = 1; // 最小值