feat: 优化
This commit is contained in:
parent
dda4ca8671
commit
6cc03cd611
@ -7,14 +7,8 @@ interface ApplicationFormType {
|
|||||||
multiple_rounds_dialogue?: boolean
|
multiple_rounds_dialogue?: boolean
|
||||||
prologue?: string
|
prologue?: string
|
||||||
dataset_id_list?: string[]
|
dataset_id_list?: string[]
|
||||||
dataset_setting?: {
|
dataset_setting?: any
|
||||||
top_n: number
|
model_setting?: any
|
||||||
similarity: number
|
|
||||||
max_paragraph_char_number: number
|
|
||||||
}
|
|
||||||
model_setting?: {
|
|
||||||
prompt: string
|
|
||||||
}
|
|
||||||
problem_optimization?: boolean
|
problem_optimization?: boolean
|
||||||
}
|
}
|
||||||
interface chatType {
|
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]
|
const filterData: any = list.filter((item: any) => item[attr] === val)?.[0]
|
||||||
return filterData || null
|
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)
|
applicationForm.value.dataset_id_list.splice(applicationForm.value.dataset_id_list.indexOf(id), 1)
|
||||||
}
|
}
|
||||||
function addDataset(val: Array<string>) {
|
function addDataset(val: Array<string>) {
|
||||||
|
|||||||
@ -206,8 +206,8 @@ function sendChatHandle(event: any) {
|
|||||||
function getHitTestList() {
|
function getHitTestList() {
|
||||||
const obj = {
|
const obj = {
|
||||||
query_text: inputValue.value,
|
query_text: inputValue.value,
|
||||||
similarity: formInline.similarity,
|
similarity: formInline.value.similarity,
|
||||||
top_number: formInline.top_number
|
top_number: formInline.value.top_number
|
||||||
}
|
}
|
||||||
if (isDataset.value) {
|
if (isDataset.value) {
|
||||||
datasetApi.getDatasetHitTest(id, obj, loading).then((res) => {
|
datasetApi.getDatasetHitTest(id, obj, loading).then((res) => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user