Commit b61b4e32 authored by 赵灿灿's avatar 赵灿灿

修改配置信息

parent 05b75a64
Pipeline #21037 passed with stages
in 3 minutes and 2 seconds
......@@ -110,7 +110,8 @@ require(['jquery', 'vue', 'utils', 'echarts', 'global'], function ($, Vue, utils
// 会话相关方法
async getSessionId() {
try {
const response = await fetch('../../api/langchain/getSessionId');
//const response = await fetch('../../api/langchain/getSessionId');
const response = await fetch('../../api/langchain/getDialogId');
const dataJson = await response.json();
this.sessionId = dataJson.data;
} catch (error) {
......@@ -185,16 +186,14 @@ require(['jquery', 'vue', 'utils', 'echarts', 'global'], function ($, Vue, utils
messagesDiv.scrollTop = messagesDiv.scrollHeight;
}
});
// 连接SSE
this.currentEventSource = new EventSource('../../api/langchain/sseBigTwo?chatMessage=' + encodeURIComponent(chatMessage) + "&sessionId=" + this.sessionId);
this.currentEventSource = new EventSource('../../api/langchain/sseIntelligent?chatMessage=' + encodeURIComponent(chatMessage) + "&dialogId=" + this.sessionId);
let responseText = '';
this.currentEventSource.onmessage = (event) => {
const data = JSON.parse(event.data);
const content = data.dataToSend[1].data;
if (content !== "stop") {
responseText += content;
this.messages[aiMessageIndex].content = responseText;
......
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 to comment