yangg 8 сар өмнө
parent
commit
708ff11867

+ 1 - 0
src/components/ai.vue

@@ -289,6 +289,7 @@
                 input_value: message,
                 output_type: "chat",
                 input_type: "chat",
+                user_id:this.$store.state.user.id,
                 tweaks:this.tweaks /* {
                   "ChatInput-U82Vu": {},
                   "Prompt-b8Z1E": {},

+ 10 - 6
src/components/webAi/js/ChatBox.js

@@ -717,7 +717,7 @@ newChat() {
         }
       }
       const chatId = this.getUuid();
-      const wsUrl =this.wsUrl//'http://58.246.234.210:7860/api/v1/run/3ef7369e-b617-40d2-9e2e-54f3ee76ed2e?stream=false'
+      const wsUrl ='http://192.168.1.199:8082/api/chatbot/chat'//this.wsUrl//'http://58.246.234.210:7860/api/v1/run/3ef7369e-b617-40d2-9e2e-54f3ee76ed2e?stream=false'
       let message = this.userInput.trim();
       if (message) {
         // Markdown换行:在每个换行符之前添加两个空格
@@ -751,13 +751,17 @@ newChat() {
             method: "POST",
             headers: {
               "Content-Type": "application/json",
+              "Access-Control-Allow-Origin": "*"
             },
+            credentials: "include",
             body: JSON.stringify({
-              chatId: chatId,
-              input_value: message,
-              output_type: "chat",
-              input_type: "chat",
-              tweaks:this.tweaks /* {
+             /*  chatId: chatId, */
+              message: message,
+              /* output_type: "chat",
+              input_type: "chat", */
+              user_id:this.$store.state.user.id,
+              session_id:''
+             /* tweaks:this.tweaks  {
                 "ChatInput-U82Vu": {},
                 "Prompt-b8Z1E": {},
                 "OllamaModel-z9SVx": {},

+ 1 - 1
src/views/document/create.vue

@@ -114,7 +114,7 @@
                     data-type="article"
                     class="sub-menus"
                   >
-                    <div @click="onLoadArticle(it.id)">{{ it.title }}</div>
+                    <div @click="onLoadArticle(it.id)" style="cursor:pointer">{{ it.title }}</div>
                   </div>
                 </el-collapse-item>
                 <el-collapse-item