mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-27 02:52:48 +00:00
feat: 优化
This commit is contained in:
parent
dda4ca8671
commit
6cc03cd611
|
|
@ -7,14 +7,8 @@ interface ApplicationFormType {
|
|||
multiple_rounds_dialogue?: boolean
|
||||
prologue?: string
|
||||
dataset_id_list?: string[]
|
||||
dataset_setting?: {
|
||||
top_n: number
|
||||
similarity: number
|
||||
max_paragraph_char_number: number
|
||||
}
|
||||
model_setting?: {
|
||||
prompt: string
|
||||
}
|
||||
dataset_setting?: any
|
||||
model_setting?: any
|
||||
problem_optimization?: boolean
|
||||
}
|
||||
interface chatType {
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ export function getImgUrl(name: string) {
|
|||
/*
|
||||
从指定数组中过滤出对应的对象
|
||||
*/
|
||||
export function realatedObject(list: any, val: string | number, attr: string) {
|
||||
export function realatedObject(list: any, val: any, attr: string) {
|
||||
const filterData: any = list.filter((item: any) => item[attr] === val)?.[0]
|
||||
return filterData || null
|
||||
}
|
||||
|
|
|
|||
|
|
@ -450,7 +450,7 @@ const openCreateModel = (provider?: Provider) => {
|
|||
}
|
||||
}
|
||||
|
||||
function removeDataset(id: string) {
|
||||
function removeDataset(id: any) {
|
||||
applicationForm.value.dataset_id_list.splice(applicationForm.value.dataset_id_list.indexOf(id), 1)
|
||||
}
|
||||
function addDataset(val: Array<string>) {
|
||||
|
|
|
|||
|
|
@ -206,8 +206,8 @@ function sendChatHandle(event: any) {
|
|||
function getHitTestList() {
|
||||
const obj = {
|
||||
query_text: inputValue.value,
|
||||
similarity: formInline.similarity,
|
||||
top_number: formInline.top_number
|
||||
similarity: formInline.value.similarity,
|
||||
top_number: formInline.value.top_number
|
||||
}
|
||||
if (isDataset.value) {
|
||||
datasetApi.getDatasetHitTest(id, obj, loading).then((res) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue