|
@@ -1111,7 +1111,6 @@ const quest = async (isFllow) => {
|
|
|
1: 10,
|
|
|
2: 15
|
|
|
};
|
|
|
-
|
|
|
let body = null
|
|
|
if (activeTab.value === 'net') {
|
|
|
body = {
|
|
@@ -1124,7 +1123,7 @@ const quest = async (isFllow) => {
|
|
|
body = {
|
|
|
query: question.value,
|
|
|
mode: 'local_kb',
|
|
|
- kb_name: activeTab.value === 'paper' ? 'compose_paper_material_total' : window?.AppGlobalConfig?.llm?.kb_name,
|
|
|
+ kb_name: activeTab.value === 'paper' ? 'compose_paper_material_total' : dsChecked.value ? window?.AppGlobalConfig?.llm?.kb_name : 'policy',
|
|
|
top_k: topKs[answerType.value],
|
|
|
search_type: answerType.value,
|
|
|
score_threshold: 0.5,
|
|
@@ -1150,8 +1149,8 @@ const quest = async (isFllow) => {
|
|
|
currentResponse.value.mockStart = true;
|
|
|
streamToAnswer();
|
|
|
}
|
|
|
-
|
|
|
- await fetchEventSource(window.AppGlobalConfig.knowledgeServer + questionUrl, {
|
|
|
+ const rootUrl = dsChecked.value ? window.AppGlobalConfig.knowledgeServer : window.AppGlobalConfig.aiServer
|
|
|
+ await fetchEventSource(rootUrl + questionUrl, {
|
|
|
method: 'POST',
|
|
|
openWhenHidden: true,
|
|
|
timeout: 300000,
|
|
@@ -1577,7 +1576,8 @@ for example:
|
|
|
redirect: 'follow'
|
|
|
};
|
|
|
|
|
|
- fetch(window.AppGlobalConfig.knowledgeServer + '/chat/chat', requestOptions)
|
|
|
+ const rootUrl = dsChecked.value ? window.AppGlobalConfig.knowledgeServer : window.AppGlobalConfig.aiServer
|
|
|
+ fetch(rootUrl + '/chat/chat', requestOptions)
|
|
|
.then((response) => {
|
|
|
return response.json()
|
|
|
})
|
|
@@ -1637,7 +1637,8 @@ const getQuestionKeyWords = async () => {
|
|
|
redirect: 'follow'
|
|
|
};
|
|
|
|
|
|
- return fetch(window.AppGlobalConfig.knowledgeServer + '/chat/chat', requestOptions)
|
|
|
+ const rootUrl = dsChecked.value ? window.AppGlobalConfig.knowledgeServer : window.AppGlobalConfig.aiServer
|
|
|
+ return fetch(rootUrl + '/chat/chat', requestOptions)
|
|
|
.then((response) => response.json())
|
|
|
.then((msgStr) => {
|
|
|
const msg = JSON.parse(msgStr)
|