|
@@ -1553,9 +1553,7 @@ const getRecommendedQuestion = async (b = false) => {
|
|
}
|
|
}
|
|
recommendedQuestionsIndex = 0;
|
|
recommendedQuestionsIndex = 0;
|
|
const raw = JSON.stringify({
|
|
const raw = JSON.stringify({
|
|
- messages: [
|
|
|
|
- {
|
|
|
|
- content: `你会收到一个用户提问,请根据问题延伸出10个子问题。
|
|
|
|
|
|
+ query: `你会收到一个用户提问,请根据问题延伸出10个子问题。
|
|
|
|
|
|
在你回答问题的时候,还需要注意推荐给用户的问题必须以列表的形式返回。
|
|
在你回答问题的时候,还需要注意推荐给用户的问题必须以列表的形式返回。
|
|
for example:
|
|
for example:
|
|
@@ -1568,11 +1566,7 @@ for example:
|
|
]
|
|
]
|
|
|
|
|
|
以下是用户提问:${question}`,
|
|
以下是用户提问:${question}`,
|
|
- role: 'user'
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
// model: 'qwen1.5-chat',
|
|
// model: 'qwen1.5-chat',
|
|
- model: 'qwen2.5-instruct',
|
|
|
|
stream: false
|
|
stream: false
|
|
});
|
|
});
|
|
|
|
|
|
@@ -1585,10 +1579,12 @@ for example:
|
|
|
|
|
|
fetch(window.AppGlobalConfig.knowledgeServer + '/chat/chat', requestOptions)
|
|
fetch(window.AppGlobalConfig.knowledgeServer + '/chat/chat', requestOptions)
|
|
.then((response) => {
|
|
.then((response) => {
|
|
|
|
+ console.log(response)
|
|
return response.json()
|
|
return response.json()
|
|
})
|
|
})
|
|
.then((msg) => {
|
|
.then((msg) => {
|
|
const str = msg.choices[0]?.message?.content;
|
|
const str = msg.choices[0]?.message?.content;
|
|
|
|
+ console.log(str)
|
|
if (str) {
|
|
if (str) {
|
|
recommendedQuestions = JSON.parse(str);
|
|
recommendedQuestions = JSON.parse(str);
|
|
questions.value = recommendedQuestions.slice(0, 5);
|
|
questions.value = recommendedQuestions.slice(0, 5);
|