|
@@ -131,7 +131,7 @@ const aiChat = (question, isPresetQuestion) => {
|
|
|
serial_no.value = userStore.userInfo?.uname + Date.now().toString()
|
|
serial_no.value = userStore.userInfo?.uname + Date.now().toString()
|
|
|
let fixed_faq = ''
|
|
let fixed_faq = ''
|
|
|
if (!is_FixedAnswer.value) {
|
|
if (!is_FixedAnswer.value) {
|
|
|
- fixed_faq = messages.value[messages.value.length - 2].content
|
|
|
|
|
|
|
+ fixed_faq = messages.value[messages.value.length - 3].content
|
|
|
} else if (isPresetQuestion) {
|
|
} else if (isPresetQuestion) {
|
|
|
fixed_faq = question
|
|
fixed_faq = question
|
|
|
}
|
|
}
|
|
@@ -145,7 +145,7 @@ const aiChat = (question, isPresetQuestion) => {
|
|
|
fixed_faq: fixed_faq
|
|
fixed_faq: fixed_faq
|
|
|
})
|
|
})
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
- if (isPause.value) {
|
|
|
|
|
|
|
+ if (isPause.value || queryTime.value === -1) {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
@@ -196,8 +196,6 @@ const handleSend = (question, isPresetQuestion = true, isExternal = false) => {
|
|
|
}
|
|
}
|
|
|
isPause.value = false
|
|
isPause.value = false
|
|
|
loadingAnswer.value = true
|
|
loadingAnswer.value = true
|
|
|
-
|
|
|
|
|
- aiChat(question, isPresetQuestion)
|
|
|
|
|
// 将用户内容添加到消息列表
|
|
// 将用户内容添加到消息列表
|
|
|
messages.value.push({
|
|
messages.value.push({
|
|
|
type: 'user',
|
|
type: 'user',
|
|
@@ -206,6 +204,8 @@ const handleSend = (question, isPresetQuestion = true, isExternal = false) => {
|
|
|
})
|
|
})
|
|
|
!isPresetQuestion ? (userQuestion.value = '') : ''
|
|
!isPresetQuestion ? (userQuestion.value = '') : ''
|
|
|
queryTime.value = 0
|
|
queryTime.value = 0
|
|
|
|
|
+
|
|
|
|
|
+ aiChat(question, isPresetQuestion)
|
|
|
messages.value.push({
|
|
messages.value.push({
|
|
|
type: 'robot',
|
|
type: 'robot',
|
|
|
content: progressStatus[0]
|
|
content: progressStatus[0]
|
|
@@ -320,6 +320,11 @@ const clearData = () => {
|
|
|
sessionStorage.removeItem('AIChat')
|
|
sessionStorage.removeItem('AIChat')
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const liabilityExeDialog = ref(true) // 免责声明弹窗
|
|
|
|
|
+const handleLiabilityExeDialog = () => {
|
|
|
|
|
+ liabilityExeDialog.value = true
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
defineExpose({
|
|
defineExpose({
|
|
|
handleSend,
|
|
handleSend,
|
|
|
handleOpen,
|
|
handleOpen,
|
|
@@ -468,8 +473,31 @@ defineExpose({
|
|
|
<span class="font_family icon-icon_send_b"></span>
|
|
<span class="font_family icon-icon_send_b"></span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="liability-exemption">Content is generated by Al, please check carefully!</div>
|
|
|
|
|
|
|
+ <div class="liability-exemption">
|
|
|
|
|
+ <span> Content is generated by Al, please check carefully!</span>
|
|
|
|
|
+ <span class="liability-exemption-btn" @click="handleLiabilityExeDialog">Disclaimer</span>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <el-dialog
|
|
|
|
|
+ class="liability-exemption-dialog"
|
|
|
|
|
+ v-model="liabilityExeDialog"
|
|
|
|
|
+ title="Disclaimer"
|
|
|
|
|
+ width="800"
|
|
|
|
|
+ >
|
|
|
|
|
+ <p style="line-height: 21px">
|
|
|
|
|
+ This feature generates automated answers summarised from FT articles. By using it, you are
|
|
|
|
|
+ interacting with an Al system (provided byAnthropic), not a human. Al can make mistakes.
|
|
|
|
|
+ Please refer to the source articles for verification and cifation purposes.
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <p style="line-height: 21px">
|
|
|
|
|
+ Our staff do not check or moderate Ask FT is answers in advance, but may review some later.
|
|
|
|
|
+ Our journalists continue to write and edit all thearticles Ask FT uses as sources. Learn
|
|
|
|
|
+ more about our editorial principles for generative Al To helo us understand how you are
|
|
|
|
|
+ usina this feafure and how we can improve it, we use your data. This includes your query and
|
|
|
|
|
+ any personadata you have shared with us, like your job title. For more information about how
|
|
|
|
|
+ we use your data, please read our Privacy Policy.
|
|
|
|
|
+ </p>
|
|
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -747,6 +775,12 @@ defineExpose({
|
|
|
color: var(--color-neutral-3);
|
|
color: var(--color-neutral-3);
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
}
|
|
}
|
|
|
|
|
+ .liability-exemption-btn {
|
|
|
|
|
+ margin-left: 2px;
|
|
|
|
|
+ text-decoration: underline;
|
|
|
|
|
+ color: var(--color-theme);
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
@keyframes loading-rotate {
|
|
@keyframes loading-rotate {
|
|
|
0% {
|
|
0% {
|
|
@@ -758,4 +792,10 @@ defineExpose({
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+:deep(.liability-exemption-dialog) {
|
|
|
|
|
+ padding-bottom: 0;
|
|
|
|
|
+ .el-dialog__body {
|
|
|
|
|
+ padding-top: 8px;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|