可信代码库-可信开源代码库AI助手近期预警公告列表开发

This commit is contained in:
付民康
2025-05-08 15:27:41 +08:00
parent be3cc41e65
commit 3fa94693b2
3 changed files with 299 additions and 4 deletions

View File

@@ -17,7 +17,9 @@
<span class="span1">完成回答</span>
</div>
<!--开源软件列表-->
<OssList />
<OssList v-if="msg.type===1"/>
<WarningList v-else-if="msg.type===2"/>
<div class="conversation-cnxw">
<a class="flex conversation-cnxw-item">
<span class="span2">猜你想问</span>
@@ -133,6 +135,7 @@ import { introPrompt, simplePrompt, mockAnswer, guessQuestions } from './mock.co
import SwiperComponent from './SwiperComponent.vue';
import GuessYouWantToAsk from './GuessYouWantToAsk.vue';
import OssList from './components/OssList.vue';
import WarningList from './components/WarningList.vue';
const inputValue = ref('');
const startChat = ref(false);
@@ -192,12 +195,13 @@ const onSubmit = (e, answer = undefined) => {
});
});
// getAIAnswer(answer ?? e);
getAIAnswer(mockAnswer);
getAIAnswer(mockAnswer,2);
};
const getAIAnswer = (content) => {
const getAIAnswer = (content,type) => {
messages.value.push({
from: 'ai-model',
type: type || 1,
content: content,
avatarPosition: 'side-left',
avatarConfig: { ...aiModelAvatar },