mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-29 07:52:50 +00:00
Merge branch 'main' of github.com:maxkb-dev/maxkb
This commit is contained in:
commit
1d12d9c219
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-text type="info">
|
||||
消耗: {{ data?.message_tokens + data?.answer_tokens }} tokens
|
||||
<span class="ml-4">{{ datetimeFormat(data.create_time) }}</span>
|
||||
</el-text>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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,16 @@
|
|||
|
||||
<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>
|
||||
|
||||
<el-tag type="info" effect="plain">
|
||||
消耗 tokens: {{ item?.message_tokens + item?.answer_tokens }}
|
||||
</el-tag>
|
||||
<el-tag class="ml-8" type="info" effect="plain">
|
||||
耗时: {{ item.run_time.toFixed(2) }} s
|
||||
</el-tag>
|
||||
</div>
|
||||
</el-card>
|
||||
<div class="flex-between mt-8" v-if="log">
|
||||
<LogOperationButton v-model:data="chatList[index]" :applicationId="appId" />
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue