feat: 应用

This commit is contained in:
wangdan-fit2cloud 2024-01-17 17:07:52 +08:00
parent ecfea48639
commit 8db1f43982
3 changed files with 17 additions and 23 deletions

View File

@ -157,7 +157,7 @@ const putSyncWebDateset: (
sync_type: string,
loading?: Ref<boolean>
) => Promise<Result<any>> = (dataset_id, sync_type, loading) => {
return put(`${prefix}/${dataset_id}/sync_web`, { sync_type }, loading)
return put(`${prefix}/${dataset_id}/sync_web`, undefined, { sync_type }, loading)
}
export default {

View File

@ -29,29 +29,7 @@
:modelValue="item"
/>
</template>
<!-- {{ prologueList }}
<h4>您好我是 {{ data?.name || '应用名称' }}</h4>
<div class="mt-4" v-if="data?.prologue">
<el-text type="info">{{ data?.prologue }}</el-text>
</div> -->
</el-card>
<!-- <el-card shadow="always" class="dialog-card mt-12" v-if="data?.example?.length > 0">
<h4 class="mb-8">您可以尝试输入以下问题</h4>
<el-space wrap>
<template v-for="(item, index) in data?.example" :key="index">
<div
@click="quickProblemHandel(item)"
class="problem-button ellipsis-2"
:class="log ? 'disabled' : 'cursor'"
v-if="item"
>
<el-icon><EditPen /></el-icon>
{{ item }}
</div>
</template>
</el-space>
</el-card> -->
</div>
</div>
<template v-for="(item, index) in chatList" :key="index">
@ -84,6 +62,9 @@
<el-card v-else shadow="always" class="dialog-card">
<MdRenderer :source="item.answer_text"></MdRenderer>
<div v-if="item.write_ed || log">
<el-divider> <el-text type="info">知识来源</el-text> </el-divider>
</div>
</el-card>
<div class="flex-between mt-8" v-if="log">
<LogOperationButton v-model:data="chatList[index]" :applicationId="appId" />

View File

@ -221,6 +221,19 @@
:footers="[]"
/>
</el-form-item>
<el-form-item @click.prevent>
<template #label>
<div class="flex align-center">
<span>问题优化</span>
<el-tooltip effect="dark" content="根据历史聊天优化完善当前问题,更利于匹配知识点。" placement="right">
<el-icon style="font-size: 16px">
<Warning />
</el-icon>
</el-tooltip>
</div>
</template>
<el-switch size="small" v-model="applicationForm.problem_optimization"></el-switch>
</el-form-item>
</el-form>
</el-scrollbar>
</div>