ai-error-assistant-pro 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/demo/api/index.js +10 -0
- package/components/demo/src/chat.vue +9 -2
- package/components/demo/src/main.vue +12 -6
- package/dist/ai-error-assistant-pro.common.js +495 -338
- package/dist/ai-error-assistant-pro.common.js.map +1 -1
- package/dist/ai-error-assistant-pro.css +1 -1
- package/dist/ai-error-assistant-pro.umd.js +495 -338
- package/dist/ai-error-assistant-pro.umd.js.map +1 -1
- package/dist/ai-error-assistant-pro.umd.min.js +3 -3
- package/dist/ai-error-assistant-pro.umd.min.js.map +1 -1
- package/package.json +3 -1
|
@@ -93,6 +93,16 @@ export async function getAutoQuestioning(iaId, message) {
|
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
+
/**
|
|
97
|
+
* 开场白及提示词查询
|
|
98
|
+
* */
|
|
99
|
+
export const queryCallWord = (resId) => {
|
|
100
|
+
return request({
|
|
101
|
+
url: prefix + `/ia/byCourseId?courseId=${resId}`,
|
|
102
|
+
method: 'get',
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
|
|
96
106
|
export async function sendMessageEventSource(params, signal, onmessage) {
|
|
97
107
|
return fetchEventSource(`${baseURL}${prefix}/assistant/conversation?token=${cache.session.getJSON('SRKJ_TOKEN_CACHE')}`, {
|
|
98
108
|
method: 'POST',
|
|
@@ -89,6 +89,10 @@ export default {
|
|
|
89
89
|
type: String,
|
|
90
90
|
default: '',
|
|
91
91
|
},
|
|
92
|
+
showMoreQA: {
|
|
93
|
+
type: Boolean,
|
|
94
|
+
default: false,
|
|
95
|
+
},
|
|
92
96
|
},
|
|
93
97
|
data() {
|
|
94
98
|
return {
|
|
@@ -193,7 +197,9 @@ export default {
|
|
|
193
197
|
content: current.message || '正在思考中。',
|
|
194
198
|
});
|
|
195
199
|
}
|
|
196
|
-
this.
|
|
200
|
+
if (this.showMoreQA) {
|
|
201
|
+
this.makeAutoQuestioning(cacheMessage);
|
|
202
|
+
}
|
|
197
203
|
},
|
|
198
204
|
makeMessageLine(res, list) {
|
|
199
205
|
const { content, status, chatId, msgId, parentMsgId, reference, commonKey, connectUrl } = JSON.parse(res.data);
|
|
@@ -246,6 +252,7 @@ export default {
|
|
|
246
252
|
content: { followUps },
|
|
247
253
|
},
|
|
248
254
|
} = autoRes;
|
|
255
|
+
this.messageData[this.messageData.length - 1].followUps = [];
|
|
249
256
|
this.messageData[this.messageData.length - 1].followUps =
|
|
250
257
|
followUps.length > 3 ? followUps.splice(0, 3) : followUps;
|
|
251
258
|
},
|
|
@@ -408,7 +415,7 @@ export default {
|
|
|
408
415
|
|
|
409
416
|
.links {
|
|
410
417
|
position: relative;
|
|
411
|
-
height: 22px;
|
|
418
|
+
min-height: 22px;
|
|
412
419
|
line-height: 22px;
|
|
413
420
|
margin: 8px 0;
|
|
414
421
|
margin-left: 10px;
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
<chat ref="chatRef"
|
|
19
19
|
:resId="resId"
|
|
20
20
|
:xtId="xtId"
|
|
21
|
+
:show-more-q-a="showMoreQA"
|
|
21
22
|
:key-word="aiMessageKeyWord"
|
|
22
23
|
:analy-exercise="analyExercise"
|
|
23
24
|
@on-reanser="reanserMethod"
|
|
@@ -35,9 +36,9 @@
|
|
|
35
36
|
<img src="../static/send-icon.png" alt="" style="width: 24px; height: 24px">
|
|
36
37
|
</div>
|
|
37
38
|
</div>
|
|
38
|
-
<p class="disclaimer"
|
|
39
|
-
|
|
40
|
-
</p
|
|
39
|
+
<!-- <p class="disclaimer">-->
|
|
40
|
+
<!-- 此功能公测期间对正式版用户开放-->
|
|
41
|
+
<!-- </p>-->
|
|
41
42
|
</template>
|
|
42
43
|
</div>
|
|
43
44
|
</template>
|
|
@@ -45,7 +46,7 @@
|
|
|
45
46
|
import Chat from './chat.vue';
|
|
46
47
|
import Cookies from "js-cookie";
|
|
47
48
|
import { getUserInfo } from '../utils/config';
|
|
48
|
-
import {
|
|
49
|
+
import {checkCourseIdIsExist, queryCallWord} from '../api/index';
|
|
49
50
|
export default {
|
|
50
51
|
name: 'AiErrorAssistant',
|
|
51
52
|
components: {
|
|
@@ -84,13 +85,18 @@ export default {
|
|
|
84
85
|
stop: false,
|
|
85
86
|
courseFlag: false,
|
|
86
87
|
message:'',
|
|
88
|
+
showMoreQA: false,
|
|
87
89
|
}
|
|
88
90
|
},
|
|
89
|
-
mounted() {
|
|
91
|
+
async mounted() {
|
|
90
92
|
if (!Cookies.get("token")) {
|
|
91
93
|
return this.$message.warning('未获取到登录信息,请重新登录');
|
|
92
94
|
}
|
|
93
95
|
getUserInfo(Cookies.get("token"));
|
|
96
|
+
const wordRes = await queryCallWord(this.resId);
|
|
97
|
+
if (!wordRes) return;
|
|
98
|
+
const { showMoreQA } = wordRes;
|
|
99
|
+
this.showMoreQA = showMoreQA;
|
|
94
100
|
},
|
|
95
101
|
methods: {
|
|
96
102
|
closeMessage() {
|
|
@@ -230,7 +236,7 @@ export default {
|
|
|
230
236
|
.ai-main-content {
|
|
231
237
|
position: relative;
|
|
232
238
|
z-index: 1;
|
|
233
|
-
height: calc(100% - 53px - 86px - 32px
|
|
239
|
+
height: calc(100% - 53px - 86px - 32px);
|
|
234
240
|
padding: 16px 0 16px 8px;
|
|
235
241
|
}
|
|
236
242
|
.disclaimer {
|