Commit c608f861 by gaord Committed by GitHub

增加给嵌入父窗口发送外链聊天开始消息,改善父窗口对聊天过程的协同响应能力 (#1252)

Signed-off-by: Ben Gao <bengao168@msn.com>
parent 0a8b104b
......@@ -84,6 +84,17 @@ const OutLink = ({
const prompts = messages.slice(-2);
const completionChatId = chatId ? chatId : nanoid();
//post message to report chat start
window.top?.postMessage(
{
type: 'shareChatStart',
data: {
question: prompts[0]?.content
}
},
'*'
);
const { responseText, responseData } = await streamFetch({
data: {
messages: prompts,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment