|
@@ -66,10 +66,6 @@ class AIService {
|
|
|
messages: this.formatMessages(message),
|
|
|
stream:true
|
|
|
});
|
|
|
- // console.log(completion);
|
|
|
- const signal = response.controller.signal;
|
|
|
- let text = '匹配到的关系为:'
|
|
|
- const paragraph = window.chatUI.addMessage(text, "assistant");
|
|
|
try {
|
|
|
const iterator = response.iterator();
|
|
|
for await (const chunk of iterator) {
|
|
@@ -84,17 +80,6 @@ class AIService {
|
|
|
|
|
|
}
|
|
|
}
|
|
|
- console.log(document.getElementById("fill-button"));
|
|
|
-
|
|
|
- document.getElementById("fill-button").onclick = () => {
|
|
|
- window.parent.postMessage({
|
|
|
- type: "HANDLE_FILL_INPUT", data: {
|
|
|
- formData: JSON.parse(this.response.split('json')[1].split('```')[0]) //根据不同返回修改res
|
|
|
- }
|
|
|
- }, "*");
|
|
|
- }
|
|
|
- this.response = text
|
|
|
- console.log(text);
|
|
|
|
|
|
} catch (error) {
|
|
|
if (signal.aborted) {
|