|
|
|
@ -27,6 +27,7 @@ const inputState=ref(true) |
|
|
|
const conversations=ref<chatRecord[]>([]) |
|
|
|
const centHoverItem=ref("") |
|
|
|
const currentAgent=ref<{name:string,uuid:string}>({}) |
|
|
|
const queryUrl=ref("") |
|
|
|
|
|
|
|
const interact_msg=ref<{ask:boolean,think:string,content:string,docinfo?:any[]}[]>([]) |
|
|
|
const props = withDefaults(defineProps<{ |
|
|
|
@ -69,12 +70,20 @@ async function onSendTextToAI(){ |
|
|
|
|
|
|
|
const params={ |
|
|
|
"onlineSearch":"否", |
|
|
|
"useDataset":"否" |
|
|
|
"useDataset":"否", |
|
|
|
"queryUrl":"" |
|
|
|
} |
|
|
|
for (let item of checkedModel.value){ |
|
|
|
if(item==="onlineSearch") params.onlineSearch="是" |
|
|
|
if(item==="onlineSearch"){ |
|
|
|
params.onlineSearch="是" |
|
|
|
if(queryUrl.value!="") { |
|
|
|
params.queryUrl=queryUrl.value |
|
|
|
//queryUrl.value="" //立即清理 |
|
|
|
} |
|
|
|
} |
|
|
|
if(item==="useDataset") params.useDataset="是" |
|
|
|
} |
|
|
|
|
|
|
|
if (conversation.value==""){ |
|
|
|
//开启新对话 |
|
|
|
interact_msg.value=[{ask:true,think:"", content:myquestion.value}] |
|
|
|
@ -325,6 +334,9 @@ onMounted(() => { |
|
|
|
{{ mod.name }} |
|
|
|
</el-checkbox-button> |
|
|
|
</el-checkbox-group> |
|
|
|
<div v-if="agent.name.startsWith('法')&&checkedModel.length>0 && checkedModel[0]=='onlineSearch' " style="width: 98%;margin-bottom: 5px;"> |
|
|
|
<el-input placeholder="是否指定网站, 多个地址以逗号分隔。" v-model="queryUrl" input-style="border-radius: 2px;"/> |
|
|
|
</div> |
|
|
|
|
|
|
|
<el-input placeholder="问灵犀..." v-model="myquestion" input-style="border-radius: 20px;" |
|
|
|
resize="none" :autosize="{minRows: 4}" type="textarea" /> |
|
|
|
|