|
|
|
@ -154,7 +154,7 @@ async function handleSend(value: string) {
|
|
|
|
|
if (!conversationData.value) { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
sendMessage(conversationData.value.id, value) |
|
|
|
|
sendMessage(conversationData.value.id, value, conversationData.value.roleId) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -237,7 +237,7 @@ async function onScrollTop(scrollTop: number) {
|
|
|
|
|
/** |
|
|
|
|
* @description: 发送消息hook |
|
|
|
|
*/ |
|
|
|
|
async function sendMessage(conversationId: string, question: string): Promise<void> { |
|
|
|
|
async function sendMessage(conversationId: string, question: string, roleId: number): Promise<void> { |
|
|
|
|
if (!messageStore.getConversationData) { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
@ -260,6 +260,7 @@ async function sendMessage(conversationId: string, question: string): Promise<vo
|
|
|
|
|
sendTextToText({ |
|
|
|
|
conversationId, |
|
|
|
|
question, |
|
|
|
|
roleId, |
|
|
|
|
modelType: modelOptions[modelIndex.value].value, |
|
|
|
|
}).catch(() => { |
|
|
|
|
messageStore.getMessageList.splice(-2) |
|
|
|
@ -275,7 +276,7 @@ function reloadMessage() {
|
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
const question = messageList.value[messageList.value.length - 2]?.content |
|
|
|
|
sendMessage(conversationData.value.id, question) |
|
|
|
|
sendMessage(conversationData.value.id, question, conversationData.value.roleId) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|