|
@@ -39,8 +39,8 @@ const DEFAULT_AI_QA_CONFIG = Object.freeze({
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const VBP_CITATION_RESOURCE = Object.freeze({
|
|
const VBP_CITATION_RESOURCE = Object.freeze({
|
|
|
- documentTitle: 'VBP执行期的生存法则逐字稿',
|
|
|
|
|
- documentUrl: `/qsfl/${encodeURIComponent('《VBP执行期的生存法则》逐字稿.pdf')}`,
|
|
|
|
|
|
|
+ documentTitle: 'VBP执行期的生存法则文字版',
|
|
|
|
|
+ documentUrl: `/qsfl/${encodeURIComponent('《VBP执行期的生存法则》文字版.pdf')}`,
|
|
|
videoTitle: 'VBP执行期的生存法则相关视频',
|
|
videoTitle: 'VBP执行期的生存法则相关视频',
|
|
|
videoUrl: `/qsfl/${encodeURIComponent('VBP执行期的生存法则相关视频.mp4')}`
|
|
videoUrl: `/qsfl/${encodeURIComponent('VBP执行期的生存法则相关视频.mp4')}`
|
|
|
})
|
|
})
|
|
@@ -432,6 +432,7 @@ watch(isAudioSpeaking, async (speaking) => {
|
|
|
if (!video) return
|
|
if (!video) return
|
|
|
if (speaking) {
|
|
if (speaking) {
|
|
|
video.currentTime = 0
|
|
video.currentTime = 0
|
|
|
|
|
+ video.playbackRate = 1.5
|
|
|
video.play().catch((error) => console.warn('数字人视频播放失败', error))
|
|
video.play().catch((error) => console.warn('数字人视频播放失败', error))
|
|
|
} else {
|
|
} else {
|
|
|
resetDigitalHumanVideo()
|
|
resetDigitalHumanVideo()
|
|
@@ -478,7 +479,7 @@ const copyMessageContent = async (content, event) => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-const getRequestContent = (content, script) => script ? `补充评分规则:\n${script}\n\n学员拜访记录:\n${content}` : content
|
|
|
|
|
|
|
+const getRequestContent = (content, script) => script ? `${content}\n 补充评分规则:\n${script}` : content
|
|
|
const selectFile = () => fileInputRef.value?.click()
|
|
const selectFile = () => fileInputRef.value?.click()
|
|
|
const formatSize = (size) => size < 1024 * 1024 ? `${Math.max(1, Math.round(size / 1024))} KB` : `${(size / 1024 / 1024).toFixed(1)} MB`
|
|
const formatSize = (size) => size < 1024 * 1024 ? `${Math.max(1, Math.round(size / 1024))} KB` : `${(size / 1024 / 1024).toFixed(1)} MB`
|
|
|
const getFileExtension = (fileName) => fileName.split('.').pop()?.toLowerCase() || ''
|
|
const getFileExtension = (fileName) => fileName.split('.').pop()?.toLowerCase() || ''
|
|
@@ -534,6 +535,8 @@ const sendMessage = async () => {
|
|
|
typewriterFullText = ''
|
|
typewriterFullText = ''
|
|
|
typewriterIndex = 0
|
|
typewriterIndex = 0
|
|
|
try {
|
|
try {
|
|
|
|
|
+ console.log(getRequestContent(content, script))
|
|
|
|
|
+ debugger
|
|
|
await props.sendChatStreamApi(id, getRequestContent(content, script), null, abortController.value, AI_QA_CONFIG.enableContext, async (event) => {
|
|
await props.sendChatStreamApi(id, getRequestContent(content, script), null, abortController.value, AI_QA_CONFIG.enableContext, async (event) => {
|
|
|
try {
|
|
try {
|
|
|
const result = JSON.parse(event.data)
|
|
const result = JSON.parse(event.data)
|
|
@@ -719,8 +722,8 @@ onUnmounted(() => {
|
|
|
muted
|
|
muted
|
|
|
playsinline
|
|
playsinline
|
|
|
preload="auto"
|
|
preload="auto"
|
|
|
|
|
+ :loop="isAudioSpeaking"
|
|
|
@loadedmetadata="handleDigitalHumanVideoReady"
|
|
@loadedmetadata="handleDigitalHumanVideoReady"
|
|
|
- @ended="resetDigitalHumanVideo"
|
|
|
|
|
></video>
|
|
></video>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="digital-human-status"><i></i>{{ isAudioSpeaking ? '正在为您播报' : '在线为您服务' }}</div>
|
|
<div class="digital-human-status"><i></i>{{ isAudioSpeaking ? '正在为您播报' : '在线为您服务' }}</div>
|
|
@@ -751,7 +754,7 @@ onUnmounted(() => {
|
|
|
:citation-ids="message.segments?.map((item) => item.id) || []"
|
|
:citation-ids="message.segments?.map((item) => item.id) || []"
|
|
|
@citation-click="openCitationById(message, $event)"
|
|
@citation-click="openCitationById(message, $event)"
|
|
|
/>
|
|
/>
|
|
|
-<!-- <div v-if="message.segments?.length" class="citation-list">
|
|
|
|
|
|
|
+ <div v-if="message.segments?.length" class="citation-list">
|
|
|
<button class="citation-summary" type="button" @click="toggleCitationList(message)">
|
|
<button class="citation-summary" type="button" @click="toggleCitationList(message)">
|
|
|
<span class="citation-summary-name">《{{ message.segments[0]?.documentName || '知识库文档' }}》</span>
|
|
<span class="citation-summary-name">《{{ message.segments[0]?.documentName || '知识库文档' }}》</span>
|
|
|
<span class="citation-summary-toggle">{{ getCitationSummaryAction(message) }}</span>
|
|
<span class="citation-summary-toggle">{{ getCitationSummaryAction(message) }}</span>
|
|
@@ -769,7 +772,7 @@ onUnmounted(() => {
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>-->
|
|
|
|
|
|
|
+ </div>
|
|
|
</template>
|
|
</template>
|
|
|
<p v-else class="user-content">{{ message.content }}</p>
|
|
<p v-else class="user-content">{{ message.content }}</p>
|
|
|
<div v-if="message.attachments?.length" class="attachment-list"><div v-for="file in message.attachments" :key="file.id" class="attachment-card"><el-icon><Paperclip /></el-icon><span class="attachment-name">{{ file.name }}</span><small>{{ formatSize(file.size) }}</small></div></div>
|
|
<div v-if="message.attachments?.length" class="attachment-list"><div v-for="file in message.attachments" :key="file.id" class="attachment-card"><el-icon><Paperclip /></el-icon><span class="attachment-name">{{ file.name }}</span><small>{{ formatSize(file.size) }}</small></div></div>
|